Browse Source

🎨 Use pos.set method

Scott Lahteine 2 years ago
parent
commit
a59766195c
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      Marlin/src/lcd/extui/ui_api.cpp

+ 2
- 4
Marlin/src/lcd/extui/ui_api.cpp View File

936
           if (x_target != current_position.x || y_target != current_position.y) {
936
           if (x_target != current_position.x || y_target != current_position.y) {
937
             // If moving across bed, raise nozzle to safe height over bed
937
             // If moving across bed, raise nozzle to safe height over bed
938
             feedrate_mm_s = Z_PROBE_FEEDRATE_FAST;
938
             feedrate_mm_s = Z_PROBE_FEEDRATE_FAST;
939
-            destination = current_position;
940
-            destination.z = Z_CLEARANCE_BETWEEN_PROBES;
939
+            destination.set(current_position.x, current_position.y, Z_CLEARANCE_BETWEEN_PROBES);
941
             prepare_line_to_destination();
940
             prepare_line_to_destination();
942
             feedrate_mm_s = XY_PROBE_FEEDRATE;
941
             feedrate_mm_s = XY_PROBE_FEEDRATE;
943
-            destination.x = x_target;
944
-            destination.y = y_target;
942
+            destination.set(x_target, y_target);
945
             prepare_line_to_destination();
943
             prepare_line_to_destination();
946
           }
944
           }
947
           feedrate_mm_s = Z_PROBE_FEEDRATE_FAST;
945
           feedrate_mm_s = Z_PROBE_FEEDRATE_FAST;

Loading…
Cancel
Save