Use correct buffer size variable when checking for softserial waiting
bytes. Fixes #127.
This commit is contained in:
parent
cbd1817f6c
commit
fd32ad6fcb
|
@ -369,7 +369,7 @@ uint8_t softSerialTotalBytesWaiting(serialPort_t *instance)
|
|||
|
||||
softSerial_t *s = (softSerial_t *)instance;
|
||||
|
||||
return (s->port.rxBufferHead - s->port.rxBufferTail) & (s->port.txBufferSize - 1);
|
||||
return (s->port.rxBufferHead - s->port.rxBufferTail) & (s->port.rxBufferSize - 1);
|
||||
}
|
||||
|
||||
uint8_t softSerialReadByte(serialPort_t *instance)
|
||||
|
|
Loading…
Reference in New Issue