Add a emergency-command parser in MarlinSerial located in MarlinSerial's RX interrupt.
The parser tries to find and execute M112,M108,M410 before the commands disappear in the RX-buffer.
To avoid false positives M117, comments and commands followed by filenames (M23, M28, M30, M32, M33) are recognized.
This enables Marlin to receive and react on the Emergency command at every time - regardless of if the buffers are full or not. Remains the task to convince the hosts to send the commands. To inform the hosts about the new feature a new entry in the M115-report was made. "EMERGENCY_CODES:M112,M108,M410;".
The parser is fast. It allways only needs two switch decisions and one assignment of the new state for every character.
One proble remains. If the host has send a incomplete line before sending an emergency command the emergency commamd could be omittet when the parser is in state_IGNORE.
In that case the host should send "\ncommand\n"
Also introducing M108 to break the waiting for the heaters in M109, M190 and M303.
Rename cancel_heatup to cancel_heatup_wait to better see the purpose.
Add a emergency-command parser in MarlinSerial located in MarlinSerial's RX interrupt.
The parser tries to find and execute M112,M108,M410 before the commands disappear in the RX-buffer. To avoid false positives M117, comments and commands followed by filenames (M23, M28, M30, M32, M33) are recognized.
This enables Marlin to receive and react on the Emergency command at every time - regardless of if the buffers are full or not. Remains the task to convince the hosts to send the commands. To inform the hosts about the new feature a new entry in the M115-report was made. "EMERGENCY_CODES:M112,M108,M410;".
The parser is fast. It allways only needs two switch decisions and one assignment of the new state for every character.
One proble remains. If the host has send a incomplete line before sending an emergency command the emergency commamd could be omittet when the parser is in
state_IGNORE
. In that case the host should send "\ncommand\n"Also introducing M108 to break the waiting for the heaters in M109, M190 and M303.
Rename
cancel_heatup
tocancel_heatup_wait
to better see the purpose.