From: W. Trevor King Date: Thu, 15 Mar 2012 00:55:55 +0000 (-0400) Subject: Oops, setup analog-reference with an AREF value, not an int. X-Git-Tag: 0.6~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=267daf496ca55f13d4dfbcceebcce9f5e4f8a23c;p=pypiezo.git Oops, setup analog-reference with an AREF value, not an int. --- diff --git a/pypiezo/base.py b/pypiezo/base.py index dcb07d2..8c89ef4 100644 --- a/pypiezo/base.py +++ b/pypiezo/base.py @@ -30,7 +30,7 @@ except (ImportError, RuntimeError), e: _matplotlib = None _matplotlib_import_error = e -from pycomedi.constant import TRIG_SRC, SDF +from pycomedi.constant import AREF, TRIG_SRC, SDF from pycomedi.utility import inttrig_insn, Reader, Writer from . import LOG as _LOG @@ -179,7 +179,7 @@ def _setup_channel_config(config, channel): config['channel'] = channel.index config['maxdata'] = channel.get_maxdata() config['range'] = channel.range.value - config['analog-reference'] = channel.aref.value + config['analog-reference'] = AREF.index_by_value(channel.aref.value) converter = channel.get_converter() config['conversion-origin' ] = converter.get_to_physical_expansion_origin()