CHDK Wiki
Line 10: Line 10:
 
==set_focus()==
 
==set_focus()==
   
* Script command that may or may not actually set the focus setting (in mm) the next time the camera shoots.
+
* script command that may or may not actually set the focus setting (in mm) the next time the camera shoots.
 
* on some cameras, set_focus() will only work if the camera is in Canon AFL mode
 
* on some cameras, set_focus() will only work if the camera is in Canon AFL mode
 
* on some cameras, set_focus() will only work if the camera is in Canon MF mode
 
* on some cameras, set_focus() will only work if the camera is in Canon MF mode
Line 18: Line 18:
 
Canon AFL mode is typically achieved via simulated button presses using ''click()'' - see your camera manual for the correct sequence.
 
Canon AFL mode is typically achieved via simulated button presses using ''click()'' - see your camera manual for the correct sequence.
   
Canon MF mode is may be achieved via simulated button presses, post_levent_for_npt call, and/or call_event_proc calls.
+
Canon MF mode is may be achieved via simulated button presses, post_levent_for_npt call, and/or call_event_proc calls.
   
 
==Forum Links==
 
==Forum Links==

Revision as of 02:06, 12 November 2013

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_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.
  • if you call set_aflock() and then set_focus() (in a mode on your camera where that works) then the focus for all subsequent shots will stay at the value specified in set_focus().  If set_aflock() has not been called then set_focus() will only apply to the next shot - after that the camera will revery to auto focus.

set_focus()

  • script command that may or may not actually set the focus setting (in mm) the next time the camera shoots.
  • on some cameras, set_focus() will only work if the camera is in Canon AFL mode
  • on some cameras, set_focus() will only work if the camera is in Canon MF mode
  • on some cameras, set_focus() will only work when the camera is in P mode (or at least not in AUTO)
  • on some cameras, set_focus works every time regardless of mode

Canon AFL mode is typically achieved via simulated button presses using click() - see your camera manual for the correct sequence.

Canon MF mode is may be achieved via simulated button presses, post_levent_for_npt call, and/or call_event_proc calls.

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