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