My script is working very well. Only the exposure control is missing. Now maybe I thought too easy. I have integrated the following code in rawopint (before exp: run ()). As soon as the camera went into ‘Half Press Release’ and ‘Half Press’ again I get the error message in rawop.meter:
Maybe I'm missing something, but rawop.meter is only valid in the raw hook, after a shot has been taken but before the image has been processed. See
http://chdk.wikia.com/wiki/Lua/Raw_Hook_Operationsexp:run assumes it will be run inside the raw hook, it does the meter, calculates all the exposure parameters, and sets the exposure values for the next shot. This won't work if you release the shutter between shots, but you might be able to use some of the lower level functions without too much work, e.g. call meter in the raw hook, and the rest after half press is released.
I haven't looked at what would be required to do this. One thing you'll need to watch out for is the aperture changing with zoom.
Alternately, you could get scene brightness from BV between shots instead of meter, since you're doing a half press per shot anyway. You could probably feed that into rawpop exp instead of meter96 without too much change.
general outline of what's called from exp:run
init_frame - adjusts some values related to the changing black level on g1x
get_cam_exposure_params - gets the initial exposure parameters if from Canon firmware values if it's the first shot
do_meter - reads the raw buffer, calculates mval96 and histogram values
calc_ev_change - calculates the required exposure change, in ev units, without
calc_exposure_parameters - distributes the required exposure change among the available parameters (tv, sv, nd)
set_cam_exposure_params - sets the overrides for the next shot.
The above should be relatively independent: If you want to replace one you should just make sure it sets the same self.foo as the existing function.