getuserdark, SetDarkMode
This commit is contained in:
20
ilt1000.py
20
ilt1000.py
@@ -28,7 +28,6 @@ class Saturated(Error):
|
|||||||
# TODO commands:
|
# TODO commands:
|
||||||
# eraselogdata
|
# eraselogdata
|
||||||
# getlogdata
|
# getlogdata
|
||||||
# getuserdark
|
|
||||||
# set100perc
|
# set100perc
|
||||||
# setautaveraging
|
# setautaveraging
|
||||||
# setcurrentloop
|
# setcurrentloop
|
||||||
@@ -40,10 +39,7 @@ class Saturated(Error):
|
|||||||
# startlogdata
|
# startlogdata
|
||||||
# stoplogdata
|
# stoplogdata
|
||||||
# usecalfactor
|
# usecalfactor
|
||||||
# usefactorydark
|
|
||||||
# usefeedbackres
|
# usefeedbackres
|
||||||
# usenodark
|
|
||||||
# useuserdark
|
|
||||||
# erasecalfactor
|
# erasecalfactor
|
||||||
# getcalfactor
|
# getcalfactor
|
||||||
# setcalfactor
|
# setcalfactor
|
||||||
@@ -160,6 +156,15 @@ class ILT1000(object):
|
|||||||
def GetDarkMode(self):
|
def GetDarkMode(self):
|
||||||
return int(self._SendCommand('getdarkmode'))
|
return int(self._SendCommand('getdarkmode'))
|
||||||
|
|
||||||
|
_DARK_MODE_COMMANDS = {
|
||||||
|
DARK_NONE: 'usenodark',
|
||||||
|
DARK_FACTORY: 'usefactorydark',
|
||||||
|
DARK_USER: 'useuserdark',
|
||||||
|
}
|
||||||
|
|
||||||
|
def SetDarkMode(self, mode):
|
||||||
|
assert int(self._SendCommand(self._DARK_MODE_COMMANDS[mode])) == 0
|
||||||
|
|
||||||
def GetFactoryDarkVoltages(self):
|
def GetFactoryDarkVoltages(self):
|
||||||
# SPEC ERROR
|
# SPEC ERROR
|
||||||
# Actual return value sample:
|
# Actual return value sample:
|
||||||
@@ -167,6 +172,13 @@ class ILT1000(object):
|
|||||||
ret = self._SendCommand('getfactorydark')
|
ret = self._SendCommand('getfactorydark')
|
||||||
return [float(x) / 1000000 for x in ret.split()]
|
return [float(x) / 1000000 for x in ret.split()]
|
||||||
|
|
||||||
|
def GetUserDarkVoltages(self):
|
||||||
|
# SPEC ERROR
|
||||||
|
# Actual return value sample:
|
||||||
|
# R1 12149 9733 9251 R2 12476 10080 9604 R3 13940 11894 11435
|
||||||
|
ret = self._SendCommand('getfactorydark')
|
||||||
|
return [float(x) / 1000000 for x in ret.split()]
|
||||||
|
|
||||||
def GetIrradiance(self):
|
def GetIrradiance(self):
|
||||||
ret = self._SendCommand('getirradiance')
|
ret = self._SendCommand('getirradiance')
|
||||||
return float(ret) / 1000
|
return float(ret) / 1000
|
||||||
|
|||||||
Reference in New Issue
Block a user