Browse Source

Update old-style axis indexes

Scott Lahteine 3 years ago
parent
commit
4a1d2d816c

+ 3
- 3
Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp View File

@@ -668,9 +668,9 @@ void MarlinUI::draw_status_screen() {
668 668
   //
669 669
 
670 670
   lcd.setCursor(0, 0);
671
-  _draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])), blink); lcd.write(' ');
672
-  _draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])), blink); lcd.write(' ');
673
-  _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position[Z_AXIS])), blink);
671
+  _draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position.x)), blink); lcd.write(' ');
672
+  _draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position.y)), blink); lcd.write(' ');
673
+  _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position.z)), blink);
674 674
 
675 675
   #if HAS_LEVELING && !HAS_HEATED_BED
676 676
     lcd.write(planner.leveling_active || blink ? '_' : ' ');

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp View File

@@ -252,7 +252,7 @@ void disp_print_time() {
252 252
 
253 253
 void disp_fan_Zpos() {
254 254
   char str_1[16];
255
-  sprintf_P(public_buf_l, PSTR("%s"), dtostrf(current_position[Z_AXIS], 1, 3, str_1));
255
+  sprintf_P(public_buf_l, PSTR("%s"), dtostrf(current_position.z, 1, 3, str_1));
256 256
   lv_label_set_text(labelZpos, public_buf_l);
257 257
 }
258 258
 

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

@@ -870,19 +870,19 @@ namespace ExtUI {
870 870
           const feedRate_t old_feedrate = feedrate_mm_s;
871 871
           const float x_target = MESH_MIN_X + pos.x * (MESH_X_DIST),
872 872
                       y_target = MESH_MIN_Y + pos.y * (MESH_Y_DIST);
873
-          if (x_target != current_position[X_AXIS] || y_target != current_position[Y_AXIS]) {
873
+          if (x_target != current_position.x || y_target != current_position.y) {
874 874
             // If moving across bed, raise nozzle to safe height over bed
875 875
             feedrate_mm_s = Z_PROBE_FEEDRATE_FAST;
876 876
             destination = current_position;
877
-            destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES;
877
+            destination.z = Z_CLEARANCE_BETWEEN_PROBES;
878 878
             prepare_line_to_destination();
879 879
             feedrate_mm_s = XY_PROBE_FEEDRATE;
880
-            destination[X_AXIS] = x_target;
881
-            destination[Y_AXIS] = y_target;
880
+            destination.x = x_target;
881
+            destination.y = y_target;
882 882
             prepare_line_to_destination();
883 883
           }
884 884
           feedrate_mm_s = Z_PROBE_FEEDRATE_FAST;
885
-          destination[Z_AXIS] = z;
885
+          destination.z = z;
886 886
           prepare_line_to_destination();
887 887
           feedrate_mm_s = old_feedrate;
888 888
         #else

+ 2
- 2
Marlin/src/module/tool_change.cpp View File

@@ -846,9 +846,9 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a
846 846
       // Cutting recover
847 847
       unscaled_e_move(toolchange_settings.extra_resume + TOOLCHANGE_FS_WIPE_RETRACT, MMM_TO_MMS(toolchange_settings.unretract_speed));
848 848
 
849
-      planner.synchronize();
849
+      // Resume at the old E position
850 850
       current_position.e = destination.e;
851
-      sync_plan_position_e(); // Resume at the old E position
851
+      sync_plan_position_e();
852 852
     }
853 853
   }
854 854
 

Loading…
Cancel
Save