Skip to content

Commit

Permalink
RxPacket freeze fix
Browse files Browse the repository at this point in the history
  • Loading branch information
richonguzman committed Oct 14, 2024
1 parent 55378bb commit c064198
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data_embed/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<div class="container d-none" id="received-packets">
<div class="row my-5 d-flex align-items-top">
<div class="col-12">
<h3>Last 20 received packets list</h3>
<h3>Last 10 received packets list</h3>
<table class="table mt-4">
<thead>
<tr>
Expand Down
6 changes: 3 additions & 3 deletions src/lora_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ namespace LoRa_Utils {
Utils::println("(RSSI:" + String(rssi) + " / SNR:" + String(snr) + " / FreqErr:" + String(freqError) + ")");

if (!Config.lowPowerMode && !Config.digi.ecoMode) {
if (receivedPackets.size() >= 10) {
receivedPackets.erase(receivedPackets.begin());
}
ReceivedPacket receivedPacket;
receivedPacket.rxTime = NTP_Utils::getFormatedTime();
receivedPacket.packet = packet.substring(3);
receivedPacket.RSSI = rssi;
receivedPacket.SNR = snr;
if (receivedPackets.size() >= 20) {
receivedPackets.erase(receivedPackets.begin());
}
receivedPackets.push_back(receivedPacket);
}

Expand Down

0 comments on commit c064198

Please sign in to comment.