Skip to content

Commit

Permalink
more cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Apr 20, 2024
1 parent 3964354 commit 7ab5ffa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/station_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ namespace STATION_Utils {
int timeToWait = 3 * 1000; // 3 segs between packet Tx and also Rx ???
uint32_t lastRx = millis() - lastRxTime;
uint32_t lastTx = millis() - lastTxTime;
if (outputPacketBuffer.size() == 0 || lastTx < timeToWait || lastRx < timeToWait) {
return;
} else {
if (outputPacketBuffer.size() > 0 && lastTx > timeToWait && lastRx > timeToWait) {
LoRa_Utils::sendNewPacket(outputPacketBuffer[0]);
outputPacketBuffer.erase(outputPacketBuffer.begin());
lastTxTime = millis();
Expand Down

0 comments on commit 7ab5ffa

Please sign in to comment.