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
No known key found for this signature in database
GPG Key ID: 5B042737EBEEB736
1 changed files with 4 additions and 0 deletions

View File

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