Skip to content

Commit

Permalink
Flush serial buffer after heating
Browse files Browse the repository at this point in the history
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 MarlinFirmware#15, thanks to @rug156 for the feedback!
  • Loading branch information
davidramiro authored and Christoph-D committed Jun 1, 2020
1 parent 7d82077 commit c2226c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8751,6 +8751,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
Expand Down

0 comments on commit c2226c7

Please sign in to comment.