@@ -126,11 +126,11 @@ def cmd_PROBE_ACCURACY(self, gcmd):
126126 params = self .probe .get_probe_params (gcmd )
127127 sample_count = gcmd .get_int ("SAMPLES" , 10 , minval = 1 )
128128 toolhead = self .printer .lookup_object ('toolhead' )
129- pos = toolhead .get_position ()
129+ start_pos = toolhead .get_position ()
130130 gcmd .respond_info ("PROBE_ACCURACY at X:%.3f Y:%.3f Z:%.3f"
131131 " (samples=%d retract=%.3f"
132132 " speed=%.1f lift_speed=%.1f)\n "
133- % (pos [0 ], pos [1 ], pos [2 ],
133+ % (start_pos [0 ], start_pos [1 ], start_pos [2 ],
134134 sample_count , params ['sample_retract_dist' ],
135135 params ['probe_speed' ], params ['lift_speed' ]))
136136 # Create dummy gcmd with SAMPLES=1
@@ -146,8 +146,8 @@ def cmd_PROBE_ACCURACY(self, gcmd):
146146 probe_session .run_probe (fo_gcmd )
147147 probe_num += 1
148148 # Retract
149- pos = toolhead .get_position ()
150- liftpos = [None , None , pos [ 2 ] + params [ 'sample_retract_dist' ] ]
149+ lift_z = toolhead .get_position ()[ 2 ] + params [ 'sample_retract_dist' ]
150+ liftpos = [start_pos [ 0 ], start_pos [ 1 ], lift_z ]
151151 self ._move (liftpos , params ['lift_speed' ])
152152 positions = probe_session .pull_probed_results ()
153153 probe_session .end_probe_session ()
0 commit comments