Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Firmware/LoRaSerial/Radio.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ PacketType rcvDatagram()
// * Received datagramType
// * DATAGRAM_DUPLICATE
// * DATAGRAM_BAD
PacketType validateDatagram(VIRTUAL_CIRCUIT * vc, PacketType datagramType, uint8_t ackNumber, uint16_t freeBytes)
PacketType validateDatagram(VIRTUAL_CIRCUIT * vc, PacketType datagramType, uint8_t ackNumber, int freeBytes)
{
if (ackNumber != vc->rmtTxAckNumber)
{
Expand Down Expand Up @@ -2389,12 +2389,12 @@ PacketType validateDatagram(VIRTUAL_CIRCUIT * vc, PacketType datagramType, uint8
}

//Verify that there is sufficient space in the serialTransmitBuffer
if (inCommandMode || ((sizeof(serialTransmitBuffer) - availableTXBytes()) < rxDataBytes))
if (inCommandMode || (freeBytes < rxDataBytes))
{
if (settings.debugReceive || settings.debugDatagrams)
{
systemPrintTimestamp();
systemPrintln("Insufficient space in the serialTransmitBuffer");
systemPrintln("Insufficient space in the receive buffer");
}
insufficientSpace++;

Expand Down