I think we have a basic difference in how we look at CHDK. I see it more as a platform for writing Lua functions. This is similar to the way smart phones are set up, i.e. as a platform for apps. Simple C functions that make it easier to program scripts in Lua are very worthwhile.
I don't think I have ever suggested anything that contradicts what you have said here, and I don't believe we have a basic difference in how we look at CHDK. We might be at odds on the definition of "simple" though.
The other reason I wrote set_exp96() is that the code for set_sv96() doesn't work correctly all the time. I had several large glitches in the exposure when using set_sv96().
I've seen those glitches too - the exif info is normal and consistent with the previous and following shot. But the image itself is massively overexposed.
However, in my previous response, I did not suggest using the set_xx96() functions. I did however point out that your set_exp96() function just does a sequence of
set_prop() commands in C rather than in Lua. Nothing gained there over just implementing the function in Lua (except for the one line of code that sets your
wait_script semaphore at the end of the function - more on that below).
Another important thing that set_exp96 does is signal chdk to abort the post shot script delay and let the camera go on to the next shot in continuous mode. I could do this by adding a parameter to get_shot_ready() so it aborts the delay without resetting the ready flag, but this is a little confusing.
One fundamental belief I have about writing good functions (per your first point above) is to maximize cohesion and minimize coupling. The use of
wait_script in your various functions works, but creates a lot of coupling between functions.
Where to from here then? I think the shot_meter() concept is really good and will make a good extension to CHDK core. As I posted elsewhere, the APEX96 functions in some form needs to be made available to Lua and uBASIC. And some method of managing "SET_NOW" vs "SET_LATER" needs to be considered. How this gets coded is secondary to the best method to integrate this functionality into CHDK.