From 4c2e38aa09c2fc1c3ef0e3a19f7665374f0e0f77 Mon Sep 17 00:00:00 2001 From: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Mon, 10 Jan 2022 09:44:16 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Include=20extra=20axes=20in=20po?= =?UTF-8?q?sition=20report=20(#23490)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/gcode/feature/pause/G60.cpp | 9 +++++--- Marlin/src/lcd/marlinui.cpp | 2 +- Marlin/src/module/motion.cpp | 30 +++++++++++--------------- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/Marlin/src/gcode/feature/pause/G60.cpp b/Marlin/src/gcode/feature/pause/G60.cpp index 4c7190091cfc1..d4770577a65f5 100644 --- a/Marlin/src/gcode/feature/pause/G60.cpp +++ b/Marlin/src/gcode/feature/pause/G60.cpp @@ -47,13 +47,16 @@ void GcodeSuite::G60() { SBI(saved_slots[slot >> 3], slot & 0x07); #if ENABLED(SAVED_POSITIONS_DEBUG) + { DEBUG_ECHOPGM(STR_SAVED_POS " S", slot); const xyze_pos_t &pos = stored_position[slot]; DEBUG_ECHOLNPAIR_F_P( - LIST_N(DOUBLE(LOGICAL_AXES), SP_E_STR, pos.e, - PSTR(" : X"), pos.x, SP_Y_STR, pos.y, SP_Z_STR, pos.z, - SP_I_STR, pos.i, SP_J_STR, pos.j, SP_K_STR, pos.k) + LIST_N(DOUBLE(LINEAR_AXES), PSTR(" : X"), pos.x, SP_Y_STR, pos.y, SP_Z_STR, pos.z, SP_I_STR, pos.i, SP_J_STR, pos.j, SP_K_STR, pos.k) + #if HAS_EXTRUDERS + , SP_E_STR, pos.e + #endif ); + } #endif } diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 7b3e267310fb2..ab132216c8884 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -771,7 +771,7 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; // Add a manual move to the queue? if (axis != NO_AXIS_ENUM && ELAPSED(millis(), start_time) && !planner.is_full()) { - const feedRate_t fr_mm_s = (axis <= LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; + const feedRate_t fr_mm_s = (axis < LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; #if IS_KINEMATIC diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index a77f395fb4c2b..d8b2bbe5030b6 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -217,9 +217,7 @@ void report_real_position() { xyze_pos_t npos = LOGICAL_AXIS_ARRAY( planner.get_axis_position_mm(E_AXIS), cartes.x, cartes.y, cartes.z, - planner.get_axis_position_mm(I_AXIS), - planner.get_axis_position_mm(J_AXIS), - planner.get_axis_position_mm(K_AXIS) + cartes.i, cartes.j, cartes.k ); TERN_(HAS_POSITION_MODIFIERS, planner.unapply_modifiers(npos, true)); @@ -263,27 +261,25 @@ void report_current_position_projected() { * Output the current position (processed) to serial while moving */ void report_current_position_moving() { - get_cartesian_from_steppers(); const xyz_pos_t lpos = cartes.asLogical(); - SERIAL_ECHOPGM( - "X:", lpos.x - #if HAS_Y_AXIS - , " Y:", lpos.y - #endif - #if HAS_Z_AXIS - , " Z:", lpos.z - #endif + + SERIAL_ECHOPGM_P( + LIST_N(DOUBLE(LINEAR_AXES), + X_LBL, lpos.x, + SP_Y_LBL, lpos.y, + SP_Z_LBL, lpos.z, + SP_I_LBL, lpos.i, + SP_J_LBL, lpos.j, + SP_K_LBL, lpos.k + ) #if HAS_EXTRUDERS - , " E:", current_position.e + , SP_E_LBL, current_position.e #endif ); stepper.report_positions(); - #if IS_SCARA - scara_report_positions(); - #endif - + TERN_(IS_SCARA, scara_report_positions()); report_current_grblstate_moving(); }