Fix deflection channel config extraction in AFM.move_just_onto_surface().
authorW. Trevor King <wking@drexel.edu>
Tue, 28 Feb 2012 20:25:07 +0000 (15:25 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 28 Feb 2012 20:25:07 +0000 (15:25 -0500)
pyafm/afm.py

index 35e8d66bc9a358aeaa7b79b979efb0c1ecfad3da..fe3da229ec2c0af17df61667c0470a9ad250b1bc 100644 (file)
@@ -83,10 +83,10 @@ class AFM (object):
         stepper_tolerance = 2*self.stepper.step_size
 
         axis = self.piezo.axis_by_name(self.axis_name)
-        defc = self.piezo._deflection_channel()
+        def_config = self.piezo.config.select_config('inputs', 'deflection')
 
         zero = _convert_volts_to_bits(axis.config['channel'], 0)
-        target_def = _convert_volts_to_bits(defc.config, setpoint)
+        target_def = _convert_volts_to_bits(def_config, setpoint)
         self._check_target_deflection(deflection=target_def)
 
         _LOG.debug('zero the %s piezo output' % self.axis_name)