well, i know that some propcases that are known in digicII are NOT known in the digicIII environment (yet), i defined them with crazy values (which is not nice), but avoids extra checking. maybe these missing values ( /trunk/include/platform.h - chdk - Trac for example in line 118 and starting in #124) can be found? maybe they ARE found but the wiki isnt updated yet? dont own dryos so i cant test it.
anyhow, i never tapped into the lua sources up to now, so someone else should do it and include the missing ubasic commands/the stuff reyalp proposed (auto-generated).
I believe most Digic III propcases were searched using the vxworks camera a570is (it being the first ported d3 cam) and I don't know if we have found any differences in procases between Digic III cameras that run dryos and vxworks.
PROPCASE_BRACKET_MODE
AFAIK, my a570 has no built-in bracketing without CHDK. Do many Digic II cameras have bracketing? Maybe an s5is user could try searching for this one?
Those flash modes are listed in
http://chdk.wikia.com/wiki/PropertyCase nowadays:
121 RW Flash adjust mode (0=Auto, 1=Manual (see 127&141)
127 RW Flash exposure compensation (units: +/- 96 per 1 stop range, if #121=0)
141 RW Manual flash output (units 0,1,2 from min to full, if #121=1)
That focus propcase may not have been searched by anyone so far.
edit: oh sorry... looks like it's #18 but read the note about aiaf.
What reyalp ment with the lua library was probably a clear text file A/CHDK/lualib/propcases.lua, which would not increase CHDK memory footprint. A file which would ideally be created by a script during make, but could just as well be cut&pasted and edited once and updated when need be. I already wrote one with a few propcases for my experiments but didn't quite name them exactly as CHDK's #defines but could just as well.
My approach is not incredibly smart since it creates a new variable for each propcase once called. Fine for one script, no good for all known property cases. Maybe a wrapper function that matches name string and calls set_prop() accordingly would be better, i.e. set_propcase("QUALITY", 1) instead of my current set_prop(PROPCASE_QUALITY, 1)
But with our number of propcases, that set_propcase() function would probably end up taking more than 1000 lua VM instructions and thus >10 ms unless we split it into more than one library function.
In general, at least for Lua we should probably refrain from creating many more functions for propcases, since they are so easily written in library code that doesn't increase size of CHDK and likely executes sufficiently fast (
http://chdk.setepontos.com/index.php/topic,1194.msg22785.html#msg22785). Of course, that only applies for functions that allow "raw" access to those propcases, without checking for flash status or something else that may be important in order to avoid crashes and not easily made accessible to Lua.