Browse Source

Update old-style axis indexes

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
4a1d2d816c
  1. 6
      Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp
  2. 2
      Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp
  3. 10
      Marlin/src/lcd/extui/ui_api.cpp
  4. 4
      Marlin/src/module/tool_change.cpp

6
Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp

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

2
Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp

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

10
Marlin/src/lcd/extui/ui_api.cpp

@ -870,19 +870,19 @@ namespace ExtUI {
const feedRate_t old_feedrate = feedrate_mm_s;
const float x_target = MESH_MIN_X + pos.x * (MESH_X_DIST),
y_target = MESH_MIN_Y + pos.y * (MESH_Y_DIST);
if (x_target != current_position[X_AXIS] || y_target != current_position[Y_AXIS]) {
if (x_target != current_position.x || y_target != current_position.y) {
// If moving across bed, raise nozzle to safe height over bed
feedrate_mm_s = Z_PROBE_FEEDRATE_FAST;
destination = current_position;
destination[Z_AXIS] = Z_CLEARANCE_BETWEEN_PROBES;
destination.z = Z_CLEARANCE_BETWEEN_PROBES;
prepare_line_to_destination();
feedrate_mm_s = XY_PROBE_FEEDRATE;
destination[X_AXIS] = x_target;
destination[Y_AXIS] = y_target;
destination.x = x_target;
destination.y = y_target;
prepare_line_to_destination();
}
feedrate_mm_s = Z_PROBE_FEEDRATE_FAST;
destination[Z_AXIS] = z;
destination.z = z;
prepare_line_to_destination();
feedrate_mm_s = old_feedrate;
#else

4
Marlin/src/module/tool_change.cpp

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

Loading…
Cancel
Save