From: W. Trevor King Date: Mon, 23 Jan 2012 21:05:45 +0000 (-0500) Subject: Finish target_deflection -> deflection conversion started a few commits ago. X-Git-Tag: v0.4~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f2198a4d98dc212ccc8432dd0e930f70950faea5;p=pyafm.git Finish target_deflection -> deflection conversion started a few commits ago. Original commit was e5d2a98f662eafacbb26598884f44ba4d3dc341f --- diff --git a/pyafm/afm.py b/pyafm/afm.py index 69d22c9..3bceed5 100644 --- a/pyafm/afm.py +++ b/pyafm/afm.py @@ -153,15 +153,15 @@ class AFM (object): def _check_target_deflection(self, deflection): defc = self.piezo._deflection_channel() max_def = defc.get_maxdata() - if target_deflection > max_def: + if deflection > max_def: _LOG.error(('requested setpoint ({:g} V = {:d} bits) is larger ' 'than the maximum deflection value of {:d} bits' - ).format(setpoint, target_deflection, max_def)) + ).format(setpoint, deflection, max_def)) raise ValueError(setpoint) - elif target_deflection < 0: + elif deflection < 0: _LOG.error(('requested setpoint ({:g} V = {:d} bits) is less ' 'than the minimum deflection value of 0 bits' - ).format(setpoint, target_deflection)) + ).format(setpoint, deflection)) raise ValueError(setpoint) def _stepper_approach_again(self, target_deflection, min_slope_ratio, far):