-
Notifications
You must be signed in to change notification settings - Fork 283
Description
Hello,
if I may, can I ask you for an additional feature? I am currently developing a LIN slave library for Arduino. It aims at supporting multiple boards and interfaces, also SoftwareSerial.
In LIN, frame synchronization is via a BREAK signal, e.g. 0x00 at 1/2 baudrate (--> 0x00 without stop bit --> framing error). This is used by the slave to reset the protocol handler. If I have access to the FE information, e.g. in ESP32 HardwareSerial, I use that information for frame synchronization. In other cases I simply use the inter-frame pause, which is ugly but seems to work.
However, for ESP32 and ESP8266 with your EspSoftwareSerial, I have a problem: seemingly your library drops bytes without stop bits. Thus my lib doesn't receive the BREAK and thus cannot react on it.
Therefore my kind request is to:
- add an additional argument to your constructor and set the default to current behavior for backward compatibility. For example "bool dropFE = true"
- in the receive handler, where you check the stop bit, keep the received byte if dropFE==false (new), else drop it (current)
- Ideally set a corresponding framing error flag via XOR, either in a 2nd buffer, or just for the last received byte (for simplicity)
For your consideration thanks a lot in advance and have a great day :-)
Georg