Update old-style axis indexes

This commit is contained in:
Scott Lahteine 2021-04-12 19:34:31 -05:00 committed by Scott Lahteine
parent f14d0e0983
commit 5ab64708c5
4 changed files with 11 additions and 11 deletions

View File

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

View File

@ -252,7 +252,7 @@ void disp_print_time() {
void disp_fan_Zpos() { void disp_fan_Zpos() {
char str_1[16]; 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); lv_label_set_text(labelZpos, public_buf_l);
} }

View File

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

View File

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