Skip to content

Instantly share code, notes, and snippets.

@bitdivision
Last active August 29, 2015 14:00
Show Gist options
  • Save bitdivision/11367093 to your computer and use it in GitHub Desktop.
Save bitdivision/11367093 to your computer and use it in GitHub Desktop.
Function to drive focus motor
def setManualFocus(cam, focusPoint):
focusList = ['Near 1', 'Near 2', 'Near 3', 'None', 'Far 1', 'Far 2', 'Far 3']
conf = camera.Config(cam)
root = conf.get_root_widget()
child = root.get_child_by_name("manualfocusdrive")
child.set_value(focusList[focusPoint])
conf.set_config()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment