From bdd75317393f5442b7e2ddc75b66090a8fc78b6a Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 8 Apr 2016 13:01:49 -0700 Subject: [PATCH] usefeedbackres --- ilt1000.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ilt1000.py b/ilt1000.py index 2556aa2..4998795 100755 --- a/ilt1000.py +++ b/ilt1000.py @@ -38,7 +38,6 @@ class Saturated(Error): # startlogdata # stoplogdata # usecalfactor -# usefeedbackres # erasecalfactor # getcalfactor # setcalfactor @@ -57,6 +56,11 @@ class ILT1000(object): 2: 'User', } + FEEDBACK_RES_AUTO = 0 + FEEDBACK_RES_LOW = 1 + FEEDBACK_RES_MEDIUM = 2 + FEEDBACK_RES_HIGH = 3 + # ILT1000 presents two FTDI serial devices, which become ttyUSB0 and ttyUSB1 # if nothing else is attached. ttyUSB0 seems to be completely non-responsive. # We default to ttyUSB1 @@ -204,3 +208,6 @@ class ILT1000(object): def GetFeedbackResistanceOhm(self): ret = self._SendCommand('getfeedbackres') return float(ret) * 100 + + def SetFeedbackResistor(self, resistor): + assert int(self._SendCommand('usefeedbackres %d' % resistor)) == 0