Show raw steps in M114

This is a proposed change. This section of M114 output is a debug
extension according to RepRap wiki.
This commit is contained in:
Scott Lahteine
2016-02-11 18:18:22 -08:00
parent 373e8a1ad4
commit 83ffc9eb4f
2 changed files with 28 additions and 6 deletions

View File

@ -4283,12 +4283,33 @@ inline void gcode_M114() {
SERIAL_PROTOCOLPGM(" E:");
SERIAL_PROTOCOL(current_position[E_AXIS]);
SERIAL_PROTOCOLPGM(MSG_COUNT_X);
SERIAL_PROTOCOL(st_get_position_mm(X_AXIS));
SERIAL_PROTOCOLPGM(" Y:");
SERIAL_PROTOCOL(st_get_position_mm(Y_AXIS));
SERIAL_PROTOCOLPGM(" Z:");
SERIAL_PROTOCOL(st_get_position_mm(Z_AXIS));
CRITICAL_SECTION_START;
extern volatile long count_position[NUM_AXIS];
long xpos = count_position[X_AXIS],
ypos = count_position[Y_AXIS],
zpos = count_position[Z_AXIS];
CRITICAL_SECTION_END;
#if ENABLED(COREXY) || ENABLED(COREXZ)
SERIAL_PROTOCOLPGM(MSG_COUNT_A);
#else
SERIAL_PROTOCOLPGM(MSG_COUNT_X);
#endif
SERIAL_PROTOCOL(xpos);
#if ENABLED(COREXY)
SERIAL_PROTOCOLPGM(" B:");
#else
SERIAL_PROTOCOLPGM(" Y:");
#endif
SERIAL_PROTOCOL(ypos);
#if ENABLED(COREXZ)
SERIAL_PROTOCOLPGM(" C:");
#else
SERIAL_PROTOCOLPGM(" Z:");
#endif
SERIAL_PROTOCOL(zpos);
SERIAL_EOL;