Also, if you had called the get_sd_modes() function it would have told you that either set_mf or set_aflock should have worked.
Can you retest using set_aflock after each set_lcd_display command like you did with set_mf ?
I'll add a note a few places in the wiki about set_mf / set_aflock and set_lcd_display. I believe this was discussed in the forum thread for set_lcd_display ( http://chdk.setepontos.com/index.php?topic=10551.msg106496#msg106496 ) but not resolved.
Hello Waterwingz,
I have tried to make the
tests you sugested:
1)
get_sd_over_modes: the value obtained is 6, i.e.
bit 2 and 4 are set.
2) when
replacing set_mf 1 by set_aflock 1, at all the occurences, chdk goes blasted, I get back control by power cycling.
3) I tried to replace the
' click "shoot_full" ' by
shoot: then it
does autofocus at each image again !!
hence the 'click "shoot_full" ' is instrumental to get the right behaviour with no autofocusthe slightly modified (working) script is pasted at the end of the post.
* * *
Some
other miscellaneous tests, and some difficulties:
A) I also tried to
set the zoom.
I could *not* get it to work, when I placed
set_zoom_speed 50
sleep 200
set_zoom 30
sleep 1000
at the begining of the program, (presumably because the lens is not extended at that stage)
but it
worked when I place those lines within the "foo" subroutineB) I played with set_tv, it worked fine; however
'print "TV", get_tv' results in a script error Tv 0000Any suggestion about this problem ?C) In an effort to get the lens extended out (and be then able to set the zoom at the beginning of the program), I tried to put
2 lines:
shoot
sleep 2000 right at the beginning of the program.
Nothing is shooted, and the lens does not extendI duno why.
D) I also played with
print statements within the "foo" subroutine: nothing visible is printed...
I
get the printed data on screen only when I go through the "emergency" subroutine, that
exit the alt mode.
what should I do to get the printed data visible within the "foo" subroutine ?
* * * *
Here below is the present version of the script. It works in the auto-run mode, and a single beep is heared when it starts.
Then taking pictures is triggered by pressing a remote usb switch *only when the green led is back "on" again, after a shooting*. (as indficated before, there is no image taken the first time the remote button is pressed but the lens extents out, the zoom is set, and the focus is set; Shooting occurs at all subsequent remote pressing (provided the green led is back on before pressing).* * *
rem Simple USB Remote Shoot script, manual focus
rem Usage: Select "Enable Remote" in "Remote parameters" and start this script.
@title Remote button
rem set_av 384
sleep 200
print "av", get_av
rem print "tv", get_tv
set_mf 1
sleep 200
print "Started OK!"
sleep 2000
playsound 4
rem print get_sd_over_modes >>6
rem "zoom step:", get_zoom_steps >>>126
while 1
wait_click 1
if is_key "remote" then gosub "Foo"
if is_key "set" then gosub "emergency"
rem "erase"
wend
end
rem **********************************
:Foo
set_lcd_display 1
sleep 200
set_zoom_speed 50
sleep 200
set_zoom 30
sleep 1000
set_mf 1
sleep 200
set_focus 220
sleep 1000
click "shoot_full"
rem shoot
sleep 2000
print "AV: ",get_av
sleep 3000
set_lcd_display 0
sleep 1000
playsound 4
sleep 400
playsound 4
return
rem **********************************
:emergency
set_lcd_display 1
set_mf 0
sleep 500
print "EMERGENCY ALT EXIT!"
sleep 3000
exit_alt
return
* * * *
Thanks for your help
