I'm writing a python object for the AD2 trigger, when I set the autotimeout value with dwf.FDwfAnalogInTriggerAutoTimeoutSet isn't returned with FDwfAnalogInTriggerAutoTimeoutGet.
My unittest sets autotimeout value to 1.213, get returns 1.25494304. do autotimeout values have to be some subdivided range of values?
Question
holla2040
Folks,
I'm writing a python object for the AD2 trigger, when I set the autotimeout value with dwf.FDwfAnalogInTriggerAutoTimeoutSet isn't returned with FDwfAnalogInTriggerAutoTimeoutGet.
My unittest sets autotimeout value to 1.213, get returns 1.25494304. do autotimeout values have to be some subdivided range of values?
@property def autotimeout(self): v = c_double() self.dwf.FDwfAnalogInTriggerAutoTimeoutGet(self.hdwf,byref(v)) return v.value @autotimeout.setter def autotimeout(self,value): self.dwf.FDwfAnalogInTriggerAutoTimeoutSet(self.hdwf,c_double(value))
def test_autotimeout(self): self.ad2.trigger.autotimeout = 1.213 print self.ad2.trigger.autotimeout self.assertEqual(1213,int(round(self.ad2.trigger.autotimeout*1000)),"trigger autotimeout incorrect")
All the other trigger variables set and get correctly.
Thanks,
Craig
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.