t1 = insns[0].data[0] + insns[1].data[1]/1e6
t2 = insns[2].data[0] + insns[2].data[1]/1e6
return (t1, insns[1].data, t2)
-
+
def display(t1, data, t2):
_LOG.info('initial time: {}'.format(t1))
_LOG.info('final time: {}'.format(t2))
cdef class Command (object):
"""A Comedi command
- >>> from .constant import AREF, CMDF, TRIG_SRC
+ >>> from .constant import AREF, CMDF, TRIG_SRC
>>> from .channel import AnalogChannel
>>> from .chanspec import ChanSpec
>>> from .device import Device
# The mA translation avoids lowercasing to 'ma'.
UNIT.append(_NamedInt(
name='external',
- value=_comedi.RF_EXTERNAL,
+ value=_comedi.RF_EXTERNAL,
doc=('RF_EXTERNAL (value unit is defined by an external reference '
'channel)')))
of the subdevice's supported trigger sources. Other elements
in the structure are undefined.
"""
- cdef _command.Command cmd
+ cdef _command.Command cmd
cmd = _command.Command()
ret = _comedilib_h.comedi_get_cmd_src_mask(
self.device.device, self.index, cmd.get_comedi_cmd_pointer())
Note that the `ChanSpec` instances in `cmd.chanlist` are not
initialized to reasonable values.
"""
- cdef _command.Command cmd
+ cdef _command.Command cmd
cmd = _command.Command()
ret = _comedilib_h.comedi_get_cmd_generic_timed(
self.device.device, self.index, cmd.get_comedi_cmd_pointer(),