found out there is already such a table:
in platform.h
#if CAM_PROPSET == 2
#define PROPCASE_DRIVE_MODE 102
#define PROPCASE_FOCUS_MODE 133
#define PROPCASE_FLASH_MODE 143
#define PROPCASE_USER_TV 264
#define PROPCASE_TV 262
#define PROPCASE_USER_AV 26
#define PROPCASE_AV 23
#define PROPCASE_MIN_AV 25
#define PROPCASE_SV 247
#define PROPCASE_DELTA_SV 79
#define PROPCASE_SV_MARKET 246
#define PROPCASE_BV 34
#define PROPCASE_SUBJECT_DIST1 245
#define PROPCASE_SUBJECT_DIST2 65
#define PROPCASE_ISO_MODE 149
#define PROPCASE_SHOOTING 206
#define PROPCASE_IS_FLASH_READY 208
#define PROPCASE_OVEREXPOSURE 103
#define PROPCASE_SHOOTING_MODE 49
#define PROPCASE_IS_MODE 145
#define PROPCASE_EV_CORRECTION_1 107
#define PROPCASE_EV_CORRECTION_2 207
#define PROPCASE_ORIENTATION_SENSOR 219
#elif CAM_PROPSET == 1
#define PROPCASE_DRIVE_MODE 6
#define PROPCASE_FOCUS_MODE 12
#define PROPCASE_FLASH_MODE 16
// need corresponding values for propset2!!!
// #define PROPCASE_FLASH_ADJUST_MODE 15
// #define PROPCASE_FLASH_CORRECTION 28
// #define PROPCASE_FLASH_MANUAL_OUTPUT 29
// #define PROPCASE_FOCUS_OK 67
// also need max. zoom steps for each cam
#define PROPCASE_USER_TV 40
#define PROPCASE_TV 69
#define PROPCASE_USER_AV 39
#define PROPCASE_AV 68
#define PROPCASE_MIN_AV 77
#define PROPCASE_SV 73
#define PROPCASE_DELTA_SV 70
#define PROPCASE_SV_MARKET 72
#define PROPCASE_BV 71
#define PROPCASE_ISO_MODE 21
#define PROPCASE_SUBJECT_DIST1 65
#define PROPCASE_SUBJECT_DIST2 66
#define PROPCASE_SHOOTING 205
#define PROPCASE_IS_FLASH_READY 221
#define PROPCASE_OVEREXPOSURE 76
#define PROPCASE_SHOOTING_MODE 0
#define PROPCASE_IS_MODE 229
#define PROPCASE_EV_CORRECTION_1 25
#define PROPCASE_EV_CORRECTION_2 26
#define PROPCASE_ORIENTATION_SENSOR 37
#else
#error unknown camera processor
#endif
the ones marked red were added by me. i'm missing a few propcase on the digicIII side, maybe y'all can help me out.
anyways, i'm compiling a special build right now that has the following new ubasic commands:
get_focus_mode
get_drive_mode
get_flash_mode
get_ready
get_flash_ready
get_IS_mode
set_ev
get_ev
get_orientation_sensor
an example script (not really functional, but shows how to use the commands):
rem Author: phyrephox
rem should work on all cameras?
@title test0r
print "-------------"
get_focus_mode a
print "get_focus_mode "a
sleep 2000
print "-------------"
get_drive_mode a
print "get_drive_mode "a
sleep 2000
print "-------------"
get_flash_mode c
print "get_flash_mode "c
sleep 2000
print "-------------"
get_ready d
print "get_ready "d
sleep 2000
print "-------------"
get_flash_ready e
print "get_flash_ready "e
sleep 2000
print "-------------"
get_IS_mode f
print "get_IS_mode "f
sleep 2000
print "-------------"
g=320
set_ev g
print "set_ev "
sleep 2000
print "-------------"
get_ev h
print "get_ev "h
sleep 2000
print "-------------"
get_orientation_sensor i
print "get_orientation_sensor "i
sleep 2000
print "-------------"
end
attached diff (sorry, not only diff of ubasic changes but my whole diff, look in the tokenizer.* & ubasic.* files), example script and s3is build. zshare link to all builds will follow.
[/color] this experimental build is likely to break compatibility with your other scripts - reason: in the ubasic parser (in c code) i have to specify an order in which the commands will be parsed.i didnt have the time and not really the energy to do that properly this time. i HAD to do it for get_focus_mode because get_focus is an already defined command, so i had to move my new command in front of that. your scripts might as well run through without problems - please test. in any case, if your scripts do NOT run through, this can & will be fixed. you can play around with the new commands and if the "bloated" code does in any way effect speed of execution.
one other thing: i would like to also implement a command like "get_max_zoom", so that you can have camera independent zoom scripts (my a620 hast 8 zoom steps, the s3is 128) - would be useful for loops & checks.
if you have suggestions regarding other, better or whole different commands - tell me. i think a few of those new get_ statements can also be transformed to set_ statements.
oh and one other thing, i dont know if this actually will up the performance, but what about a command like that: "sleep_until_ready". cam would sleep until ready. that would rid you of a loop to detect if it is ready. imo.
regards, phox
link to binaries:
zSHARE - r384_phyrephox_ubasic.zipedit: reminder to self:
add shortcut to quickly disable grid. also in grid options: add new checkbox: "always load on startup".
reason: the "antitheft" grids will be much better appreciated among chdk folks if there is an option to quickly disable grids (when loaded) - and have an option to always display on boot.
by the way i havent found a setting which would allow the grid to be drawn in playback mode - i guess this was on purpose, maybe we should introduce that. edit: maybe use the current shortcut (that disabled OSD alltogether) to cycle through the grid states AND osd. the antitheft osd looks much better (and way more serious) withouth the other OSD icons.
next idea along those lines: setting of different grids. one "startup" grid (e.g. antitheft) that will be loaded in rec & playmode (of course configurable) and one "everyday script". with the shortcut you easily cycle through "on (first), on (second) and off". this *should* be easy to implement.
summing up:
a) alter fast ev switch shortcuts for cams like a620 (cams without the bunch of dedicated buttons)
b) sort the ubasic commands in order - make benchmarks
c) find new & improved ubasic commands
d) find out zoom_max for each cameramodel and define it in platform.h
e) play with the grid settings
f) look @sdm source and copy things like orientation sensor-driven menu
b,c & d will finally make way for "universal scripts". one script to rule them all *chuckle*