From: W. Trevor King Date: Mon, 8 Dec 2008 19:29:58 +0000 (-0500) Subject: Explicit cast to int to avoid lsampl type problem. X-Git-Tag: 0.2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f395c0f0577d3ab2d69d129df6ef19c645b84442;p=pycomedi.git Explicit cast to int to avoid lsampl type problem. See commit 5b69b33d46529be30bbdf15b392f0b96986bdcdd for another example. --- diff --git a/pycomedi/common.py b/pycomedi/common.py index 970a31b..371422a 100644 --- a/pycomedi/common.py +++ b/pycomedi/common.py @@ -356,7 +356,7 @@ class PyComediIO (object) : else : oor = self._comedi.COMEDI_OOR_NUMBER self._comedi.comedi_set_global_oor_behavior(oor) - phys = self._comedi.comedi_to_phys(comedi, self._comedi_range[chan_index], self.maxdata[chan_index]) + phys = self._comedi.comedi_to_phys(int(comedi), self._comedi_range[chan_index], self.maxdata[chan_index]) if self.verbose : print "comedi %d = %g Volts on subdev %d, chan %d, range [%g, %g], max %d" % (comedi, phys, self.subdev, self.chan[chan_index], self._comedi_range[chan_index].max, self._comedi_range[chan_index].min, self.maxdata[chan_index]) return phys