if get_propset()==1 then prop_coming_tv=69 prop_coming_sv=73elseif get_propset()==2 then prop_coming_tv=262 prop_coming_sv=247else print("Unsupported propset " .. get_propset()) print("!! ERROR ERROR !!") returnend
Quote...prop_coming_tv=262shall i add these as lua/ubasic commands so you dont have to do the checks?
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).
...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.
Started by Johng
General Help and Assistance on using CHDK stable releases
Started by TheJez
« 1 2 »
General Discussion and Assistance
Started by msl
Started by fudgey
Started by dan4307