Actually, I've already accomplished what I was trying to do, which is solve the timing problem with shoot_full_only. The result is that I can take pictures at better than 1 shot per second, with accurate metering (in histogram.c). I added two Lua Functions that do what get_shooting() does for shots that press and release half_shoot.
set_shot_wait() is called right before press("shoot_full_only"). It clears the shot_ready flag to 0.
Then, in raw.c, I set the shot_ready flag to 1 right after the call to build_histogram.
get_shot_ready() tells me the histogram is done, or if it isn't enabled, that I can release "shoot_full_only" and the camera will recognize a new press and initiate a new shot. If you press shoot_full_only while the camera is still taking the last shot, it will ignore it, and slow down the shot rate. You can demonstrate this by pressing the shutter rapidly (with your finger) and only releasing it half way. As you press faster, it starts missing shots. The best time to press is right after you hear the shutter click closed. raw file save is called right at that time.
What I'm trying to do is eliminate the necessity for a Lua call to set_shot_wait() right before press shoot_full_only, which will make less code, and less complexity for using the capability in Lua. This is how simple it is to take metered shots faster that 1 per second with the new functions:
repeat
press("shoot_full_only")
repeat sleep(10)until get_shot_ready()
release("shoot_full_only")
tv=tv+get_shot_meter()
set_prop(pTV,tv)
set_prop(pTV2,tv)
sleep(1)
until false
As for the question at hand, I realized that I can just clear the shot_waiting flag to 0 for press, click,
or release of shoot_full_only. I don't have to figure out how to tell them apart or add any complexity. Just one call in luascript.c does it, and I know where it goes. I'll let you know if it works.
I just got finished taking some time lapses with my new functions. I'll post them in the other thread by tomorrow. They take a little time to process. You can take a look at yesterday's video results here, created with the get_shot_meter() function:
http://chdk.setepontos.com/index.php?topic=8997.msg94214#msg94214