From: W. Trevor King Date: Wed, 19 May 2010 06:47:37 +0000 (-0400) Subject: Allow negative voltages in hooke.driver.picoforce.PicoForceDriver._translate_block_info X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ce3319468900321adfe339e5c9c43c29dc396a9c;p=hooke.git Allow negative voltages in hooke.driver.picoforce.PicoForceDriver._translate_block_info --- diff --git a/hooke/driver/picoforce.py b/hooke/driver/picoforce.py index a203fcb..4ab2008 100644 --- a/hooke/driver/picoforce.py +++ b/hooke/driver/picoforce.py @@ -261,7 +261,7 @@ class PicoForceDriver (Driver): ret['columns'] = ['z piezo (m)', 'deflection (m)'] volt_re = re.compile( - 'V \[Sens. (\w*)\] \(([.0-9]*) V/LSB\) ([.0-9]*) V') + 'V \[Sens. (\w*)\] \(([.0-9]*) V/LSB\) (-?[.0-9]*) V') match = volt_re.match(z_piezo_info['@4:Z scale']) assert match.group(1) == 'ZSensorSens', z_piezo_info['@4:Z scale'] ret['z piezo sensitivity (V/bit)'] = float(match.group(2))