diff options
author | bubnikv <bubnikv@gmail.com> | 2016-06-23 09:46:15 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2016-06-23 09:46:15 +0300 |
commit | 78ebd522b60f818383e5ad63500c1ad8fc9e6160 (patch) | |
tree | b6384812b5ba6b374b34b900367e1f43ada8748e /Firmware/MarlinSerial.cpp | |
parent | 08bf6acf1bb4af6559d55411894086e6b5619e29 (diff) |
Removed support for DELTA, SCARA and BARICUDA.
Implemented bed skew calibration by matching a precise physical model
to the measured data using the least squares method.
Rewrote handling of the command buffer to preserve memory
and allow pushing the commands to the front of the queue.
Diffstat (limited to 'Firmware/MarlinSerial.cpp')
-rw-r--r-- | Firmware/MarlinSerial.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Firmware/MarlinSerial.cpp b/Firmware/MarlinSerial.cpp index e4e737433..fba87cc86 100644 --- a/Firmware/MarlinSerial.cpp +++ b/Firmware/MarlinSerial.cpp @@ -53,8 +53,16 @@ FORCE_INLINE void store_char(unsigned char c) //SIGNAL(SIG_USART_RECV) SIGNAL(M_USARTx_RX_vect) { - unsigned char c = M_UDRx; - store_char(c); + // Test for a framing error. + if (M_UCSRxA & (1<<M_FEx)) { + // Characters received with the framing errors will be ignored. + // The temporary variable "c" was made volatile, so the compiler does not optimize this out. + volatile unsigned char c = M_UDRx; + } else { + // Read the input register. + unsigned char c = M_UDRx; + store_char(c); + } } #endif |