Subtitle : Getting the "set_focus()" command in CHDK scripts, or the "Override Subject Distance" menu item in the Enhanced Photo Operations menu, to work.
set_focus()
Script command that may or may not actually set the focus setting (in mm) the next time the camera shoots.
set_aflock()
- causes the Canon firmware to stop focussing when shooting
- does an initial focus measurement and sets focus at that value when called
- works on all cameras
- using this does not seem to affect whether set_focus() works on does not. If it works before calling set_aflock() it will work after (allowing you to change the focus distance). If set_focus() was not working prior to set_aflock() it still won't work afterwards.
Manual Focus
If your camera has a manual focus mode then this works pretty well. If not then you just have to get lucky.
Forum Links
http://chdk.setepontos.com/index.php?topic=9533.0
http://chdk.setepontos.com/index.php?topic=8016.msg94251#msg94251
http://chdk.setepontos.com/index.php?topic=6672.msg75166#msg75166