Call report_current_position instead of gcode_M114 directly
This commit is contained in:
parent
df2d0eb37c
commit
dcb4cdaa9e
1 changed files with 12 additions and 9 deletions
|
@ -504,7 +504,7 @@ void serial_echopair_P(const char* s_P, float v) { serialprintPGM(s_P);
|
||||||
void serial_echopair_P(const char* s_P, double v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
|
void serial_echopair_P(const char* s_P, double v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
|
||||||
void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
|
void serial_echopair_P(const char* s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); }
|
||||||
|
|
||||||
void gcode_M114();
|
static void report_current_position();
|
||||||
|
|
||||||
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
void print_xyz(const char* prefix, const float x, const float y, const float z) {
|
void print_xyz(const char* prefix, const float x, const float y, const float z) {
|
||||||
|
@ -2886,8 +2886,7 @@ inline void gcode_G28() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gcode_M114(); // Send end position to RepetierHost
|
report_current_position();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(MESH_BED_LEVELING)
|
#if ENABLED(MESH_BED_LEVELING)
|
||||||
|
@ -3595,8 +3594,7 @@ inline void gcode_G28() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gcode_M114(); // Send end position to RepetierHost
|
report_current_position();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DISABLED(Z_PROBE_SLED) // could be avoided
|
#if DISABLED(Z_PROBE_SLED) // could be avoided
|
||||||
|
@ -3632,7 +3630,7 @@ inline void gcode_G28() {
|
||||||
#endif
|
#endif
|
||||||
stow_z_probe(false); // Retract Z Servo endstop if available. Z_PROBE_SLED is missed here.
|
stow_z_probe(false); // Retract Z Servo endstop if available. Z_PROBE_SLED is missed here.
|
||||||
|
|
||||||
gcode_M114(); // Send end position to RepetierHost
|
report_current_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //!Z_PROBE_SLED
|
#endif //!Z_PROBE_SLED
|
||||||
|
@ -4229,7 +4227,7 @@ inline void gcode_M42() {
|
||||||
|
|
||||||
clean_up_after_endstop_move();
|
clean_up_after_endstop_move();
|
||||||
|
|
||||||
gcode_M114(); // Send end position to RepetierHost
|
report_current_position();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // AUTO_BED_LEVELING_FEATURE && Z_MIN_PROBE_REPEATABILITY_TEST
|
#endif // AUTO_BED_LEVELING_FEATURE && Z_MIN_PROBE_REPEATABILITY_TEST
|
||||||
|
@ -4878,9 +4876,9 @@ inline void gcode_M92() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M114: Output current position to serial port
|
* Output the current position to serial
|
||||||
*/
|
*/
|
||||||
inline void gcode_M114() {
|
static void report_current_position() {
|
||||||
SERIAL_PROTOCOLPGM("X:");
|
SERIAL_PROTOCOLPGM("X:");
|
||||||
SERIAL_PROTOCOL(current_position[X_AXIS]);
|
SERIAL_PROTOCOL(current_position[X_AXIS]);
|
||||||
SERIAL_PROTOCOLPGM(" Y:");
|
SERIAL_PROTOCOLPGM(" Y:");
|
||||||
|
@ -4941,6 +4939,11 @@ inline void gcode_M114() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* M114: Output current position to serial port
|
||||||
|
*/
|
||||||
|
inline void gcode_M114() { report_current_position(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M115: Capabilities string
|
* M115: Capabilities string
|
||||||
*/
|
*/
|
||||||
|
|
Reference in a new issue