Serial buffer over run work around for v2.0.0 (#9236)
* Work around for serial buffer over run PronterFace sends a lot of M105 commands. During long operations such as UBL's G29 P1, G29 P2, G29 P4 and G26 this can over run the serial buffer. This results (very often) in a M1 (actually a M1M105) ending up in the command queue. Until we figure out a better way to resolve this issue, this will keep the UBL commands from experiencing bogus commands at thier completion.
This commit is contained in:
@ -69,6 +69,8 @@
|
||||
uint8_t xon_xoff_state = XON_XOFF_CHAR_SENT | XON_CHAR;
|
||||
#endif
|
||||
|
||||
void clear_command_queue();
|
||||
|
||||
#if ENABLED(SERIAL_STATS_DROPPED_RX)
|
||||
uint8_t rx_dropped_bytes = 0;
|
||||
#endif
|
||||
@ -388,7 +390,8 @@
|
||||
// reading rx_buffer_head and updating rx_buffer_tail, the previous rx_buffer_head
|
||||
// may be written to rx_buffer_tail, making the buffer appear full rather than empty.
|
||||
CRITICAL_SECTION_START;
|
||||
rx_buffer.head = rx_buffer.tail;
|
||||
rx_buffer.head = rx_buffer.tail = 0;
|
||||
clear_command_queue();
|
||||
CRITICAL_SECTION_END;
|
||||
|
||||
#if ENABLED(SERIAL_XON_XOFF)
|
||||
|
Reference in New Issue
Block a user