Suggestion for revision of the current 'camera.h' system. - page 3 - General Discussion and Assistance - CHDK Forum  

Suggestion for revision of the current 'camera.h' system.

  • 26 Replies
  • 6864 Views
*

Offline philmoz

  • *****
  • 3163
    • Photos
Re: Suggestion for revision of the current 'camera.h' system.
« Reply #20 on: 09 / April / 2011, 05:42:36 »
Advertisements

A suggestion: include commented-out 'default section' in the header of platform-camera.h.

AFAIK most 'porters' will start by copying a reference camera, and this will assure
they get to see all the available defines.  This implies, of course, that the
default section contains all of them, preferably with description ...

Not sure I understand this? Do you mean include a copy of the 'camera.h' default values into each of the 'platform_camera.h' files?
If so I would recommend against it - this is the sort of documentation that quickly gets out of date, and becomes worse than no documentation at all.
You would end up with old/stale information in some of the platform_camera.h files - who would want to update every platform_camera.h file whenever they something changed in the main camera.h file?

Quote
(extract from camprops_xref.log for CHDK trunk 1132)
Quote
......
Properties NOT INCLUDED, because MISSING in Default Values:  * ASPECT_GAMES_XCORRECTION * ASPECT_GAMES_XCORRECTION(x) * ASPECT_GAMES_YCORRECTION * ASPECT_GAMES_YCORRECTION(y) * ASPECT_GRID_XCORRECTION * ASPECT_GRID_XCORRECTION(x) * ASPECT_GRID_YCORRECTION * ASPECT_GRID_YCORRECTION(y) * CAM_ACTIVE_AREA_X1 * CAM_ACTIVE_AREA_X2 * CAM_ACTIVE_AREA_Y1 * CAM_ACTIVE_AREA_Y2 * cam_CalibrationIlluminant1 * cam_CFAPattern * CAM_COLORMATRIX1 * CAM_JPEG_HEIGHT * CAM_JPEG_WIDTH * CAM_STARTUP_CRASH_FILE_OPEN_FIX * DNG_EXT_FROM * DNG_EXT_TO * GAMES_SCREEN_HEIGHT * GAMES_SCREEN_WIDTH * OPT_CURVES * PARAM_CAMERA_NAME * SYNCHABLE_REMOTE_NOT_ENABLED
......

I'm currently rewriting my parsing code to adapt to the new situation, and will soon issue
a small fix to prevent CHDK-Shell from falling over in case this gets implemented before
it's ready.


I think the idea of automatically generated documentation of all the camera settings is a good long term solution. I like the way you have done it in CHDK-Shell - any chance this could be turned into a standalone tool that could be included in the default makefile (and run on the autobuild server). The identification of properties with no defaults is a great aid as it shows where things need tidying and will encourage people to do things correctly.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)

*

Offline whim

  • ******
  • 2023
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Suggestion for revision of the current 'camera.h' system.
« Reply #21 on: 09 / April / 2011, 06:01:57 »
Hi Phil,

You're right of course, on second thought it would probably be better to include, say,
a hint for 'porters' in the header to copy the defaults there themselves ...

I'll keep the idea of a stand-alone property cross-reference tool in mind while rewriting
the parsing code.

thanks,

wim 


Re: Suggestion for revision of the current 'camera.h' system.
« Reply #22 on: 09 / April / 2011, 10:49:14 »
CHDK-DE is specially designed for German users (default language a.s.o.), has an extended command set for scripts, another DOF calculator (maybe better as the old calculator), some GUI extensions and many more.
@msl :  Is there a link to a page showing the additional (or different) feature of the CHDK-DE version ?  I understand that if I download that version,  I only need to delete the German language file to cause CHDK-DE to function in English.

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline msl

  • *****
  • 1269
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Suggestion for revision of the current 'camera.h' system.
« Reply #23 on: 09 / April / 2011, 11:42:19 »
Is there a link to a page showing the additional (or different) feature of the CHDK-DE version ?

This is a little bit difficult. You can only follow the commits (timeline CHDK-DE). The documentation is in German. Basic things are in the text file ---INFO.txt. For the users the differences documented in the German CHDK manual. (Extended CHDK-DE features are marked by magenta color.)

I understand that if I download that version,  I only need to delete the German language file to cause CHDK-DE to function in English.

Yes, in conf.c is german.lng set as default. Is german.lng not available CHDK uses the in-built language code.

msl
CHDK-DE:  CHDK-DE links


*

Offline whim

  • ******
  • 2023
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Suggestion for revision of the current 'camera.h' system.
« Reply #24 on: 12 / April / 2011, 09:21:56 »
Quote
I'll keep the idea of a stand-alone property cross-reference tool in mind while rewriting
the parsing code.

Stand alone cross referencing tool for camera properties, can work in GUI or command line mode  :)
Extra camera name columns in the output (as in CHDK-Shell) are default, but can be suppressed.
Does NOT work for 'old' builds (i.e. the ones without 'platform_camera.h' files)
 
              CHDKXREF.7z (266 kB  .7z incl. source) [edit 14-04-2011: new version 1.01]
              CRC-32:  CE687663
              MD5:      37AEA1A81DC513A721672917E373F250
              SHA1:     09572AB6487F5BFC605219BA6F185FDAC73CDE15

Suggestions, comments, requests ?

wim

[edit 13/04/11]
Because CHDKXREF enumeraterates the /platform folders rather than parse the Makefile to create
it's camera list, as a side effect it identifies camera's that have /platform code, but no entries
in the original camera.h - they will show up as empty rows in the output.
For trunk r1141 camera's affected are:  IXUSW_SD430 and S80
[edit 14/04/11]
New version 1.01 can now automatically create 'cleaned' platform_camera.h files
« Last Edit: 14 / April / 2011, 14:06:29 by whim »

*

Offline msl

  • *****
  • 1269
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Suggestion for revision of the current 'camera.h' system.
« Reply #25 on: 13 / April / 2011, 05:09:44 »
Sorry for that, but this is not the type of split that I imagine.

Now I must search in 60+ files for informations, which are not classified.

I think as the first step would it be necessary the preparation of a common format and a unified order in camera.h. Now would be the chance to remove all unnecessary items to. First attempts are seen in CHDK-DE camera.h. Only then comes the second step of dividing.

whim's cross reference tool is a good approach to collect information. But I must also be able to quickly find information in camera.h files without any tool.

msl
CHDK-DE:  CHDK-DE links

*

Offline msl

  • *****
  • 1269
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Suggestion for revision of the current 'camera.h' system.
« Reply #26 on: 13 / April / 2011, 16:45:52 »
Sorry for my "nagging" in the last post. ;)

The new CHDK shell version (3.15) is a good step to collect camera informations. This is also very helpful for a cleanup in camera.h file(s).

Good work.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics