Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions Firmware/LoRaSerial/Serial.ino
Original file line number Diff line number Diff line change
Expand Up @@ -931,10 +931,8 @@ void resetSerial()

//Empty the buffers
rxHead = rxTail;
radioTxHead = radioTxTail;
txHead = txTail;
commandRXHead = commandRXTail;
commandTXHead = commandTXTail;
endOfTxData = &outgoingPacket[headerBytes];
commandLength = 0;
}
9 changes: 8 additions & 1 deletion Firmware/LoRaSerial/States.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2887,7 +2887,10 @@ void breakLink()
}

//Flush the buffers
resetSerial();
if (!inCommandMode)
resetSerial();
radioTxHead = radioTxTail;
endOfTxData = &outgoingPacket[headerBytes];

//Reset the radio and the link
triggerEvent(TRIGGER_RADIO_RESET);
Expand Down Expand Up @@ -3052,7 +3055,11 @@ void vcBreakLink(int8_t vcIndex)
//Flush the buffers
outputSerialData(true);
if (vcIndex == myVc)
{
resetSerial();
radioTxHead = radioTxTail;
endOfTxData = &outgoingPacket[headerBytes];
}
}

//Place VC in LINK-UP state since it is receiving HEARTBEATs from the remote radio
Expand Down