@title gentled chdk2 script for zooming and shooting rem author Dave Mitchell - dave@zenonic.demon.co.uk rem this script lets a Gentled CHDK2 use two servo channels to control zooming and shooting rem rem This script is designed to work for A-series (which have 8 or 14 zoom steps), SD-series (Ixus/Elph which also have 8 steps) rem and S-series (which have 128 steps) rem In each case it provides for at least 4 zoom positions. rem @param c Camera Series A=0 SD/IXUS=0 S=1 @default c 0 if c<0 then c=0 if c>1 then c=1 rem calculate relative zoom value if c = 0 then z = 2 else z = 25 while 1 do a = get_usb_power until a>0 if a <=4 then gosub "ch1up" else if a <=7 then gosub "ch1mid" else if a <=10 then gosub "ch1down" else if a <=13 then gosub "ch2up" else if a <=16 then gosub "ch2mid" else if a <=19 then gosub "ch2down" else print "error" endif wend end :ch1up print "shoot" shoot return :ch1mid print "channel 1 middle" return :ch1down print "channel 2 down" return :ch2up print "zoom in" set_zoom_rel z return :ch2mid print "channel 2 middle" return :ch2down print "zoom out" set_zoom_rel -z return return