Here's the code:
--[[
@title Remote AFL V3
@chdk_version 1.3
--]]
shots=0
text_size = 2
xpos2 = get_gui_screen_width()==480 and 140 or 80 -- shot count
ypos2 = 180
clr1 = 258
clr2 = 259
set_console_layout(0, 1, 48, 6)
sleep(1000)
set_config_value(121,1) -- make sure USB remote is enabled
set_record(1) -- switch to shooting mode
sleep(2000)
print("press Func/Set to focus")
print("press Menu to enable shooting")
repeat
wait_click(10)
if is_key('set') then -- reset AFL
set_aflock(1)
print("locking focus")
end
until is_key('menu')
sleep(1000)
print("shooting")
print("press menu to halt")
press('shoot_half')
repeat sleep(10) until get_shooting()
repeat
wait_click(10)
if is_key('remote') then
press("shoot_full_only")
repeat sleep(50) until(get_exp_count()~=ecnt)
release("shoot_full_only")
shots=shots+1
end
string2 = "shots:"..shots
draw_string(xpos2, ypos2,string2, clr1, clr2, text_size)
until is_key('menu')
release('shoot_half')
sleep(500)
set_aflock(0)
set_config_value(121,0) -- make sure USB remote is enabled
There are two issues.
- I would like to have it do a check for exposure before actually shooting
- the current frame counter here counts many multiples during one frame shoot, sometimes as many as eight per frame. In the old version with Ixus 55, it counted just one frame per actual trigger of the switch to Arduino, but with the 95, the counter goes haywire.
So maybe there is something in the code that is actually dependent on the type of the camera, but I can't find it.
Waterwingz, many thanks again, you're a rock star!