Show raw steps in M114

This is a proposed change. This section of M114 output is a debug
extension according to RepRap wiki.
2.0.x
Scott Lahteine 9 years ago
parent 373e8a1ad4
commit 83ffc9eb4f

@ -4283,12 +4283,33 @@ inline void gcode_M114() {
SERIAL_PROTOCOLPGM(" E:");
SERIAL_PROTOCOL(current_position[E_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);
SERIAL_PROTOCOL(st_get_position_mm(X_AXIS));
#endif
SERIAL_PROTOCOL(xpos);
#if ENABLED(COREXY)
SERIAL_PROTOCOLPGM(" B:");
#else
SERIAL_PROTOCOLPGM(" Y:");
SERIAL_PROTOCOL(st_get_position_mm(Y_AXIS));
#endif
SERIAL_PROTOCOL(ypos);
#if ENABLED(COREXZ)
SERIAL_PROTOCOLPGM(" C:");
#else
SERIAL_PROTOCOLPGM(" Z:");
SERIAL_PROTOCOL(st_get_position_mm(Z_AXIS));
#endif
SERIAL_PROTOCOL(zpos);
SERIAL_EOL;

@ -124,6 +124,7 @@
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin " DETAILED_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" UUID "\n"
#define MSG_COUNT_X " Count X: "
#define MSG_COUNT_A " Count A: "
#define MSG_ERR_KILLED "Printer halted. kill() called!"
#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
#define MSG_RESEND "Resend: "

Loading…
Cancel
Save