CFG Editor Table Format

The SDM and CHDK CFG editors are table-driven for ease of maintenance. The tables share the same format, a java properties file, where each line has the format:

   key=value string

The bulk of the entries define entries in the CFG file and have a numeric key (the number assigned to the entry in the conf.c source file). These numeric entries have the format:

   n=codeletter, language file entry, "description", optional values

Although the current numeric table entries are in ascending consecutive numeric order, this is not a requirement, merely a convenience to make it easy to spot errors.

If the language file entry is not blank, and the editor located a language file, the language file entry is used by the editor in place of the "description". Note: 'empty' language entries must contain at least one blank.

The 11 code letters are:

B a binary (On/Off) entry, such as the ones that determine if an OSD element is shown or not
C a colour entry, such as the ones that determine the colour of the histogram
E an enumerated entry, whose values are confined to a limited set (e.g. the clock entry whose values are "Don't", "Normal" or "Seconds"). The actual stored value of the entry is the position of the value in the list (e.g. "Normal" would be stored as 1).
The 'optional values' part of the entry is a comma-separated list of the possible values.
H a heading entry, defining the title of an SDM Menu or Sub-Menu (not used by CHDK)
I a numeric entry, such camera spacing
M a menu array entry (not used by SDM) used to define a CHDK User Menu. Note that though the editor displays these entries, it does not currently allow them to be modified.
P a position entry, defining the position of an OSD element.
The 'optional values' define the width and height of the element in pixels. For the latest version of the SDM OSD Editor, the width and height may be followed by a 'Mode' character:
if the item is only to be displayed in Playback mode
if the item is only to be displayed in Record mode

Also for SDM only, the width and height can also be followed by a reference to an Integer item that is to be used as a scaling factor - the width and height of the OSD item being multiplied by the scaling factor value. Thus entries like these:

   100=P, ,"Clock",40,16,999
   999=I, ,"clock scale factor"

would result in the width and height of entry 42 (the Clock positional item) being multiplied by the integer value of item 999 at runtime.

Note: the scale factor reference may precede or follow the Mode character (P or R) if that is present.

S a string entry, such as the name of a script file
U an unused entry (which might be present in the CFG file for historical reasons but is not used by the current version of SDM).
Not used by CHDK.
V a value array entry, such as the one used to save default script parameter values
X a scale entry, used by CHDK to scale OSD entries (not used by SDM)

In addition to these numeric entries there are some alphanumeric ones with special meanings:

version defines the SDM or CHDK version whose source code was used to build the table. The current SDM Table is based on SDM 1.86 while the CHDK table is based on build 3966.
n defines the size of the tables used internally by the editor. This number must be at least as large as the number of numeric entries.
pid identifies the 'platform_id' entry (this defines the camera in use and is used by the editors to determine the size of the LCD display when modifying positional entries). Note that this is no longer used for CHDK files.
orientid In SDM this identifies the 'camera orientation' entry (an enumerated entry having the values 'H','V' or 'U'). If the value is 'V' then the LCD display is rotated (i.e. it would be 240 pixels wide and 360 pixels high). Not used by CHDK.
sw defines the standard LCD width (360 pixels)
sh defines the standard LCD height (240 pixels)
swnnnn where 'nnnn' is a number - this defines the LCD width for a camera with platform_id 'nnnn'.
shnnnn where 'nnnn' is a number - this defines the LCD height for a camera with platform_id 'nnnn'.
sysparm (SDM Only) when the entry with this id is scanned by the editor it, and subsequent entries, are not displayed if "Hide System Parameters" is set.

Version History

Click here to return to the SDM Editor page and here to return to the CHDK Editor page

Comments, suggestions and bug reports welcome.

See here for other KAP and CHDK stuff of mine.