Complete setpoint removal started with 1139d17967014ca0fe79773796dda182b3441f9f.
authorW. Trevor King <wking@drexel.edu>
Mon, 23 Jan 2012 21:17:46 +0000 (16:17 -0500)
committerW. Trevor King <wking@drexel.edu>
Mon, 23 Jan 2012 21:17:46 +0000 (16:17 -0500)
pyafm/afm.py

index b346275dc37d302c2f5b60078818bf6fc6c0a10e..35e8d66bc9a358aeaa7b79b979efb0c1ecfad3da 100644 (file)
@@ -157,12 +157,12 @@ class AFM (object):
             _LOG.error(('requested setpoint ({} bits) is larger than the '
                         'maximum deflection value of {} bits'
                         ).format(deflection, max_def))
-            raise ValueError(setpoint)
+            raise ValueError(deflection)
         elif deflection < 0:
             _LOG.error(('requested setpoint ({} bits) is less than the '
                         'minimum deflection value of 0 bits'
                         ).format(deflection))
-            raise ValueError(setpoint)
+            raise ValueError(deflection)
 
     def _stepper_approach_again(self, target_deflection, min_slope_ratio, far):
         _LOG.info('back off %d half steps and approach until deflection > %g'