From 7ab5ffa81da74136c5b7718b1998299cc9637693 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Sat, 20 Apr 2024 12:38:45 -0400 Subject: [PATCH] more cleaning --- src/station_utils.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/station_utils.cpp b/src/station_utils.cpp index 07dcf13..dbbbaa2 100644 --- a/src/station_utils.cpp +++ b/src/station_utils.cpp @@ -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();