Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2016-06-23 09:46:15 +0300
committerbubnikv <bubnikv@gmail.com>2016-06-23 09:46:15 +0300
commit78ebd522b60f818383e5ad63500c1ad8fc9e6160 (patch)
treeb6384812b5ba6b374b34b900367e1f43ada8748e /Firmware/MarlinSerial.cpp
parent08bf6acf1bb4af6559d55411894086e6b5619e29 (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.cpp12
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