getfeedbackresnumber
This commit is contained in:
2
dump.py
2
dump.py
@@ -47,6 +47,8 @@ LINES = [
|
||||
('Irradiance threshold (low)', ilt.GetIrradianceThresholdLow, ''),
|
||||
('Clock frequency', ilt.GetClockFrequencyHz, '㎐'),
|
||||
('Feedback resistance', ilt.GetFeedbackResistanceOhm, 'Ω'),
|
||||
('Feedback resistor', lambda: ilt.FEEDBACK_RES_NAMES[ilt.GetFeedbackResistor()], ''),
|
||||
('Feedback resistor setting', lambda: ilt.FEEDBACK_RES_NAMES[ilt.GetFeedbackResistorSetting()], ''),
|
||||
('Factory dark', ilt.GetFactoryDarkVoltages, 'V'),
|
||||
('User dark', ilt.GetUserDarkVoltages, 'V'),
|
||||
('Ambient', ilt.GetAmbientCurrent, 'A'),
|
||||
|
||||
14
ilt1000.py
14
ilt1000.py
@@ -56,7 +56,6 @@ class CommandError(Error):
|
||||
# getecaldate
|
||||
# setecal
|
||||
|
||||
# getfeedbackresnumber
|
||||
# usefeedbackrestemp
|
||||
# setfeedbackres
|
||||
|
||||
@@ -107,6 +106,13 @@ class ILT1000(object):
|
||||
FEEDBACK_RES_MEDIUM = 2
|
||||
FEEDBACK_RES_HIGH = 3
|
||||
|
||||
FEEDBACK_RES_NAMES = {
|
||||
0: 'Auto',
|
||||
1: 'Low',
|
||||
2: 'Medium',
|
||||
3: 'High',
|
||||
}
|
||||
|
||||
AVERAGING_AUTO = 0
|
||||
AVERAGING_LOW = 1 # 5 ㎐
|
||||
AVERAGING_MEDIUM = 2 # 2 ㎐
|
||||
@@ -255,6 +261,12 @@ class ILT1000(object):
|
||||
ret = self._SendCommand('getfeedbackres')
|
||||
return float(ret) * 100
|
||||
|
||||
def GetFeedbackResistor(self):
|
||||
return int(self._SendCommand('getfeedbackresnumber'))
|
||||
|
||||
def GetFeedbackResistorSetting(self):
|
||||
return int(self._SendCommand('usefeedbackres'))
|
||||
|
||||
def SetFeedbackResistor(self, resistor=FEEDBACK_RES_AUTO):
|
||||
self._SendCommandOrDie('usefeedbackres %d' % resistor)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user