Skip to content

Commit 71b74e1

Browse files
Merge pull request HelTecAutomation#152 from davidbrodrick/SoftwareSerialFix
Change software serial time delay data type to prevent overflow <4800 baud
2 parents 031be55 + 9672c9f commit 71b74e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cores/asr650x/Serial/SoftwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "SoftwareSerial.h"
22

33
uint8_t SoftwareSerial::s_currentRx = ~0;
4-
uint8_t SoftwareSerial::s_timeDelay = 0;
4+
uint16_t SoftwareSerial::s_timeDelay = 0;
55
RingBuffer<uint8_t, 64> SoftwareSerial::s_rxDataBuffer = RingBuffer<uint8_t, 64>();
66
bool SoftwareSerial::s_overflow = false;
77

cores/asr650x/Serial/SoftwareSerial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class SoftwareSerial : public Stream
4949

5050
static uint8_t s_currentRx;
5151
static RingBuffer<uint8_t, 64> s_rxDataBuffer;
52-
static uint8_t s_timeDelay;
52+
static uint16_t s_timeDelay;
5353
static bool s_overflow;
5454

5555
uint8_t _rxpin;

0 commit comments

Comments
 (0)