File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " EspSoftwareSerial" ,
3
- "version" : " 6.12.5 " ,
3
+ "version" : " 6.12.6 " ,
4
4
"description" : " Implementation of the Arduino software serial for ESP8266/ESP32." ,
5
5
"keywords" : [
6
6
" serial" , " io" , " softwareserial"
Original file line number Diff line number Diff line change 1
1
name =EspSoftwareSerial
2
- version =6.12.5
2
+ version =6.12.6
3
3
author =Dirk Kaar, Peter Lerup
4
4
maintainer =Dirk Kaar <dok@dok-net.net>
5
5
sentence =Implementation of the Arduino software serial for ESP8266/ESP32.
Original file line number Diff line number Diff line change @@ -427,11 +427,13 @@ void SoftwareSerial::rxBits() {
427
427
428
428
m_isrBuffer->for_each (m_isrBufferForEachDel);
429
429
430
- // stop bit can go undetected if leading data bits are at same level
431
- // and there was also no next start bit yet, so one byte may be pending.
430
+ // A stop bit can go undetected if leading data bits are at same level
431
+ // and there was also no next start bit yet, so one word may be pending.
432
+ // Check that there was no new ISR data received in the meantime, inserting an
433
+ // extraneous stop level bit out of sequence breaks rx.
432
434
if (m_rxCurBit > -1 && m_rxCurBit < m_pduBits - m_stopBits) {
433
435
const uint32_t detectionCycles = (m_pduBits - m_stopBits - m_rxCurBit) * m_bitCycles;
434
- if (ESP.getCycleCount () - m_isrLastCycle > detectionCycles) {
436
+ if (!m_isrBuffer-> available () && ESP.getCycleCount () - m_isrLastCycle > detectionCycles) {
435
437
// Produce faux stop bit level, prevents start bit maldetection
436
438
// cycle's LSB is repurposed for the level bit
437
439
rxBits (((m_isrLastCycle + detectionCycles) | 1 ) ^ m_invert);
You can’t perform that action at this time.
0 commit comments