Oops, setup analog-reference with an AREF value, not an int.
authorW. Trevor King <wking@drexel.edu>
Thu, 15 Mar 2012 00:55:55 +0000 (20:55 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 15 Mar 2012 00:55:55 +0000 (20:55 -0400)
pypiezo/base.py

index dcb07d22167d851c943d2e93cfeb6052d3f3a179..8c89ef4ebbd37de872134e71f9b5d8314fa14ad1 100644 (file)
@@ -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()