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_PROTOCOLPGM(" E:");
SERIAL_PROTOCOL(current_position[E_AXIS]); SERIAL_PROTOCOL(current_position[E_AXIS]);
SERIAL_PROTOCOLPGM(MSG_COUNT_X); CRITICAL_SECTION_START;
SERIAL_PROTOCOL(st_get_position_mm(X_AXIS)); extern volatile long count_position[NUM_AXIS];
SERIAL_PROTOCOLPGM(" Y:"); long xpos = count_position[X_AXIS],
SERIAL_PROTOCOL(st_get_position_mm(Y_AXIS)); ypos = count_position[Y_AXIS],
SERIAL_PROTOCOLPGM(" Z:"); zpos = count_position[Z_AXIS];
SERIAL_PROTOCOL(st_get_position_mm(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; SERIAL_EOL;

View file

@ -124,6 +124,7 @@
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature" #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_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_X " Count X: "
#define MSG_COUNT_A " Count A: "
#define MSG_ERR_KILLED "Printer halted. kill() called!" #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_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: " #define MSG_RESEND "Resend: "