From: W. Trevor King Date: Fri, 16 Mar 2012 04:36:04 +0000 (-0400) Subject: Fix delection -> current_deflection typo in AFMPiezo.move_just_onto_surface(). X-Git-Tag: 0.7~17 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=27596c120dadc46ba0631b02931a03d5373aa946;p=pypiezo.git Fix delection -> current_deflection typo in AFMPiezo.move_just_onto_surface(). Also increase logging output, since I'm getting stuct in a loop here for some reason. --- diff --git a/pypiezo/afm.py b/pypiezo/afm.py index 09f8976..488caff 100644 --- a/pypiezo/afm.py +++ b/pypiezo/afm.py @@ -213,7 +213,7 @@ class AFMPiezo (_base.Piezo): pos_array=[self.last_output[axis_name]] for i in range(pre_move_steps): self.jump(axis_name, piezo.last_output[axis_name]) - delection = self.read_deflection() + current_deflection = self.read_deflection() if aquire_data: def_array.append(current_deflection) pos_array.append(self.last_output[axis_name]) @@ -231,8 +231,10 @@ class AFMPiezo (_base.Piezo): self.jump(axis_name, jump_to) current_deflection = self.read_deflection() log_string = ( - 'current z piezo position %6d, current deflection %6d' - % (current_deflection, self.last_output[axis_name])) + ('current z piezo position {:6d} (target {:6d}), ' + 'current deflection {:6d} (target {:6d})').format( + self.last_output[axis_name], position, + current_deflection, deflection)) _LOG.debug(log_string) if aquire_data: def_array.append(current_deflection)