Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions update/beta/Arducam.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,12 @@ def __init__(self, dev=0):
self.hasFocus = True
self.opts[Focuser.OPT_FOCUS]["MIN_VALUE"] = ctrl['minimum']
self.opts[Focuser.OPT_FOCUS]["MAX_VALUE"] = ctrl['maximum']
self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default']
if hasattr(ctrl,'default'):
self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default']
if hasattr(ctrl,'default_value'):
self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default_value']
self.focus_value = get_ctrl(self.fd, Focuser.FOCUS_ID)

if not self.hasFocus:
raise RuntimeError("Device {} has no focus_absolute control.".format(self.dev))

Expand Down Expand Up @@ -199,4 +202,4 @@ def set(self,opt,value,flag = 1):
def __del__(self):
self.fd.close()

pass
pass
9 changes: 6 additions & 3 deletions update/main/Arducam.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,12 @@ def __init__(self, dev=0):
self.hasFocus = True
self.opts[Focuser.OPT_FOCUS]["MIN_VALUE"] = ctrl['minimum']
self.opts[Focuser.OPT_FOCUS]["MAX_VALUE"] = ctrl['maximum']
self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default']
if hasattr(ctrl,'default'):
self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default']
if hasattr(ctrl,'default_value'):
self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default_value']
self.focus_value = get_ctrl(self.fd, Focuser.FOCUS_ID)

if not self.hasFocus:
raise RuntimeError("Device {} has no focus_absolute control.".format(self.dev))

Expand Down Expand Up @@ -199,4 +202,4 @@ def set(self,opt,value,flag = 1):
def __del__(self):
self.fd.close()

pass
pass
9 changes: 6 additions & 3 deletions update/mini/Arducam.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,12 @@ def __init__(self, dev=0):
self.hasFocus = True
self.opts[Focuser.OPT_FOCUS]["MIN_VALUE"] = ctrl['minimum']
self.opts[Focuser.OPT_FOCUS]["MAX_VALUE"] = ctrl['maximum']
self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default']
if hasattr(ctrl,'default'):
self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default']
if hasattr(ctrl,'default_value'):
self.opts[Focuser.OPT_FOCUS]["DEF_VALUE"] = ctrl['default_value']
self.focus_value = get_ctrl(self.fd, Focuser.FOCUS_ID)

if not self.hasFocus:
raise RuntimeError("Device {} has no focus_absolute control.".format(self.dev))

Expand Down Expand Up @@ -199,4 +202,4 @@ def set(self,opt,value,flag = 1):
def __del__(self):
self.fd.close()

pass
pass