Skip to content

Commit

Permalink
Handle even more get_temperature() error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbe authored and LabOne committed Feb 5, 2019
1 parent f862979 commit 45f2488
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion andorEmccd/andorEmccd.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class LibInstance:
20024: "DRV_NO_NEW_DATA",
20034: "DRV_TEMPERATURE_OFF",
20035: "DRV_TEMP_NOT_STABILIZED",
20036: "DRV_TEMPERATURE_STABILIZED",
20037: "DRV_TEMPERATURE_NOT_REACHED",
20066: "DRV_P1INVALID",
20067: "DRV_P2INVALID",
Expand Down Expand Up @@ -84,7 +85,11 @@ def get_temperature():
ret = dll.GetTemperature(ctypes.byref(t))
if self.return_codes.get(ret, "UNKNOWN") == "DRV_TEMPERATURE_OFF":
return None
err_check(ret, ["DRV_SUCCESS", "DRV_TEMPERATURE_NOT_REACHED", "DRV_TEMP_NOT_STABILIZED"])
err_check(ret, [
"DRV_SUCCESS",
"DRV_TEMPERATURE_NOT_REACHED",
"DRV_TEMP_NOT_STABILIZED",
"DRV_TEMPERATURE_STABILIZED"])
return t.value
self.get_temperature = get_temperature

Expand Down

0 comments on commit 45f2488

Please sign in to comment.