🚸 Include extra axes in position report (#23490)

This commit is contained in:
DerAndere
2022-01-10 09:44:16 +01:00
committed by GitHub
parent 0dfc17ca60
commit a719020348

View File

@@ -217,9 +217,7 @@ void report_real_position() {
xyze_pos_t npos = LOGICAL_AXIS_ARRAY( xyze_pos_t npos = LOGICAL_AXIS_ARRAY(
planner.get_axis_position_mm(E_AXIS), planner.get_axis_position_mm(E_AXIS),
cartes.x, cartes.y, cartes.z, cartes.x, cartes.y, cartes.z,
planner.get_axis_position_mm(I_AXIS), cartes.i, cartes.j, cartes.k
planner.get_axis_position_mm(J_AXIS),
planner.get_axis_position_mm(K_AXIS)
); );
TERN_(HAS_POSITION_MODIFIERS, planner.unapply_modifiers(npos, true)); TERN_(HAS_POSITION_MODIFIERS, planner.unapply_modifiers(npos, true));
@@ -263,27 +261,23 @@ void report_current_position_projected() {
* Output the current position (processed) to serial while moving * Output the current position (processed) to serial while moving
*/ */
void report_current_position_moving() { void report_current_position_moving() {
get_cartesian_from_steppers(); get_cartesian_from_steppers();
const xyz_pos_t lpos = cartes.asLogical(); const xyz_pos_t lpos = cartes.asLogical();
SERIAL_ECHOPGM(
"X:", lpos.x SERIAL_ECHOPGM_P(
#if HAS_Y_AXIS LIST_N(DOUBLE(LOGICAL_AXES),
, " Y:", lpos.y SP_E_LBL, current_position.e,
#endif X_LBL, lpos.x,
#if HAS_Z_AXIS SP_Y_LBL, lpos.y,
, " Z:", lpos.z SP_Z_LBL, lpos.z,
#endif SP_I_LBL, lpos.i,
#if HAS_EXTRUDERS SP_J_LBL, lpos.j,
, " E:", current_position.e SP_K_LBL, lpos.k
#endif )
); );
stepper.report_positions(); stepper.report_positions();
#if IS_SCARA TERN_(IS_SCARA, scara_report_positions());
scara_report_positions();
#endif
report_current_grblstate_moving(); report_current_grblstate_moving();
} }