Oops, `def` is a reserved word in Python. Use `defc` instead.
authorW. Trevor King <wking@drexel.edu>
Mon, 23 Jan 2012 20:53:04 +0000 (15:53 -0500)
committerW. Trevor King <wking@drexel.edu>
Mon, 23 Jan 2012 20:53:04 +0000 (15:53 -0500)
pyafm/afm.py

index a73b59792e2190af458713d378683c373d17fd9e..0417e6bae26e81a33dfe65d18c91d1c8c5ff0a74 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)
-        def = self._deflection_channel()
+        defc = self._deflection_channel()
 
         zero = _convert_volts_to_bits(axis.config['channel'], 0)
-        target_def = _convert_volts_to_bits(def.config, setpoint)
+        target_def = _convert_volts_to_bits(defc.config, setpoint)
         self._check_target_deflection(target_def)
 
         _LOG.debug('zero the %s piezo output' % self.axis_name)
@@ -151,8 +151,8 @@ class AFM (object):
             % (depth, self.stepper.position, target, target_m))
 
     def _check_target_deflection(self, target_deflection):
-        def = self._deflection_channel()
-        max_def = def.get_maxdata():
+        defc = self._deflection_channel()
+        max_def = defc.get_maxdata():
         if target_deflection > max_def:
             _LOG.error(('requested setpoint ({:g} V = {:d} bits) is larger '
                         'than the maximum deflection value of {:d} bits'