From: W. Trevor King Date: Mon, 26 Sep 2011 15:10:54 +0000 (-0400) Subject: Fix up ,select_config usage; now unit tests pass. X-Git-Tag: 0.6~32 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=37b18a7f0f2aea4b3e6dea60a086048617bc6334;p=pypiezo.git Fix up ,select_config usage; now unit tests pass. --- diff --git a/pypiezo/afm.py b/pypiezo/afm.py index da05b68..616c6f4 100644 --- a/pypiezo/afm.py +++ b/pypiezo/afm.py @@ -105,8 +105,8 @@ class AFMPiezo (_base.Piezo): into the deflection input channel. >>> target_pos = _base.convert_volts_to_bits( - ... p.config.select_config('axes', 'channel', - get_attribute=_base.get_axis_name), 2) + ... p.config.select_config('axes', 'z', + ... get_attribute=_base.get_axis_name)['channel'], 2) >>> step = int((target_pos - pos)/5) >>> target_def = _base.convert_volts_to_bits( ... p.config.select_config('inputs', 'deflection'), 3) diff --git a/pypiezo/test.py b/pypiezo/test.py index e2efd7d..2f39cc2 100644 --- a/pypiezo/test.py +++ b/pypiezo/test.py @@ -92,10 +92,10 @@ def get_piezo_config(storage=None): conversion-origin: 0 inverse-conversion-coefficients: 0, 1 inverse-conversion-origin: 0 - >>> get_axis_name - >>> d = p.select_config('inputs', 'deflection', - ... get_attribute=_get_axis_name) - >>> d['channel']['name'] + >>> _get_axis_name(p['axes'][0]) + 'x' + >>> d = p.select_config('inputs', 'deflection') + >>> d['name'] 'deflection' """ piezo_config = _PiezoConfig(storage=storage)