From f395c0f0577d3ab2d69d129df6ef19c645b84442 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 8 Dec 2008 14:29:58 -0500 Subject: [PATCH] Explicit cast to int to avoid lsampl type problem. See commit 5b69b33d46529be30bbdf15b392f0b96986bdcdd for another example. --- pycomedi/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.26.2