>>> p.setup_config()
>>> print(config['channel'].dump())
- {'channel': 0,
- 'conversion-coefficients': array([ -1.00000000e+01, 3.05180438e-04]),
- 'conversion-origin': 0.0,
- 'device': '/dev/comedi0',
- 'inverse-conversion-coefficients': array([ 0. , 3276.75]),
- 'inverse-conversion-origin': -10.0,
- 'maxdata': 65535L,
- 'range': 0,
- 'subdevice': 1}
+ name:
+ device: /dev/comedi0
+ subdevice: 1
+ channel: 0
+ maxdata: 65535
+ range: 0
+ conversion-coefficients: -10.0, 0.000305180437934
+ conversion-origin: 0.0
+ inverse-conversion-coefficients: 0.0, 3276.75
+ inverse-conversion-origin: -10.0
>>> print(config['monitor'].dump())
- {'channel': 0,
- 'conversion-coefficients': array([ -1.00000000e+01, 3.05180438e-04]),
- 'conversion-origin': 0.0,
- 'device': '/dev/comedi0',
- 'inverse-conversion-coefficients': array([ 0. , 3276.75]),
- 'inverse-conversion-origin': -10.0,
- 'maxdata': 65535L,
- 'range': 0,
- 'subdevice': 0}
+ name:
+ device: /dev/comedi0
+ subdevice: 0
+ channel: 0
+ maxdata: 65535
+ range: 0
+ conversion-coefficients: -10.0, 0.000305180437934
+ conversion-origin: 0.0
+ inverse-conversion-coefficients: 0.0, 3276.75
+ inverse-conversion-origin: -10.0
>>> convert_bits_to_meters(p.config, 0)
... # doctest: +ELLIPSIS
>>> c = InputChannel(config=channel_config, channel=channel)
>>> c.setup_config()
>>> print(channel_config.dump())
- {'channel': 0,
- 'conversion-coefficients': array([ -1.00000000e+01, 3.05180438e-04]),
- 'conversion-origin': 0.0,
- 'device': '/dev/comedi0',
- 'inverse-conversion-coefficients': array([ 0. , 3276.75]),
- 'inverse-conversion-origin': -10.0,
- 'maxdata': 65535L,
- 'range': 0,
- 'subdevice': 0}
+ name:
+ device: /dev/comedi0
+ subdevice: 0
+ channel: 0
+ maxdata: 65535
+ range: 0
+ conversion-coefficients: -10.0, 0.000305180437934
+ conversion-origin: 0.0
+ inverse-conversion-coefficients: 0.0, 3276.75
+ inverse-conversion-origin: -10.0
>>> convert_bits_to_volts(c.config, 0)
-10.0