2020-09-02 11:39:27 +02:00
|
|
|
From a66e2713eb76a1c8b555760f73ce7418312b58d6 Mon Sep 17 00:00:00 2001
|
2020-06-25 22:35:50 +02:00
|
|
|
From: Francisco Molina <femolina@uc.cl>
|
|
|
|
Date: Thu, 4 Jun 2020 15:39:07 +0200
|
2020-09-02 11:39:27 +02:00
|
|
|
Subject: [PATCH 8/9] drivers/common/openserial: add flag to echo badcrc frames
|
2020-06-25 22:35:50 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
drivers/common/openserial.c | 6 +++++-
|
|
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/drivers/common/openserial.c b/drivers/common/openserial.c
|
2020-09-02 11:39:27 +02:00
|
|
|
index f0dcb19e..2fc2c858 100644
|
2020-06-25 22:35:50 +02:00
|
|
|
--- a/drivers/common/openserial.c
|
|
|
|
+++ b/drivers/common/openserial.c
|
2020-07-24 16:57:58 +02:00
|
|
|
@@ -733,9 +733,13 @@ port_INLINE void inputHdlcClose(void) {
|
|
|
|
openserial_vars.inputBufFillLevel -= 2;
|
2020-06-25 22:35:50 +02:00
|
|
|
} else {
|
|
|
|
// the CRC is incorrect
|
|
|
|
-
|
|
|
|
+#ifdef OPENSERIAL_ECHO_BADCRC
|
|
|
|
+ // Force echo on invalid crc
|
|
|
|
+ openserial_vars.inputBuf[0] = SERFRAME_PC2MOTE_TRIGGERSERIALECHO;
|
|
|
|
+#else
|
|
|
|
// drop the incoming frame
|
2020-07-24 16:57:58 +02:00
|
|
|
openserial_vars.inputBufFillLevel = 0;
|
2020-06-25 22:35:50 +02:00
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2020-09-02 11:39:27 +02:00
|
|
|
2.28.0
|
2020-06-25 22:35:50 +02:00
|
|
|
|