Flush serial buffer after heating

Some hosts like Pronterface use continuous M105 commands to poll temperature, this causes a software halt when the heating via M109 or M190 is finished. Flushing the rx buffer fixes this.

As reported in #15, thanks to @rug156 for the feedback!
This commit is contained in:
David Ramiro
2019-02-06 11:42:24 +01:00
parent 574b2f8aed
commit 42f52d34b4

View File

@@ -8551,6 +8551,10 @@ inline void gcode_M109() {
#if DISABLED(BUSY_WHILE_HEATING)
KEEPALIVE_STATE(IN_HANDLER);
#endif
// flush the serial buffer after heating to prevent lockup by m105
flush_and_request_resend();
}
#if HAS_HEATED_BED