CHDK/uBASIC/Scripts: EV bracketing with TV and AV commands

EV bracketing with TV and AV commands
Rem written for A710is by Stebu

There are several commands for getting and setting the aperture and the speed. They only work in Manual mode; well you can change the settings in any mode, but they are effective in manual mode, probably also in Av and Tv modes). The commands are

get_tv target set_tv_rel val set_tv val get_av target set_av_rel val set_av val

Target is the name of a variable (a, b, ..z), val is an expression. I used the following script to study the behaviour of these commands. a controls the execution a=0 reads the current settings, =1 sets Tv=b, =2 sets Av=c, =3 sets both and changes the screen display by performing half_click. a=4 runs the bracketing scritp and takes three shots with -2/3, 0 and + 2/3 corrections to the existing manual settings.

On my camera these seem to work. rem A710is, Stebu, 17.05.2007 rem testing av and tv commands, use Manual mode @title TV_AV test @param a get setTv Av set_get brkt @default a 0 @param b TV @default b 20 @param c AV @default c 10 @param d delay (10ms) @default d 10 if a=0 then goto "read" if a=1 then goto "set_tv" if a=2 then goto "set_av" if a=3 then goto "set_get" goto "bracket"
 * set_get

set_av c set_tv b print "AV,TV set to",c,b sleep 1000 click "shoot_half" sleep 10*d goto read
 * read

get_av n get_tv m print "AA,TV got",n,m end
 * set_av

set_av c print "AV set to",c end
 * set_tv

set_tv b print "TV set to",b end
 * bracket

rem increase light (1/3+1/3 steps) set_tv_rel 0-1 set_av_rel 0-1 shoot sleep 10*d rem decrease light to original set_tv_rel 1 set_av_rel 1 shoot sleep 10*d rem decrease light set_tv_rel 1 set_av_rel 1 shoot sleep 10*d rem back to original settings? set_tv_rel 0-1 set_av_rel 0-1 click "shoot_half" end