Skip to content

Commit 15ee1c2

Browse files
Include RSSI in rangetest csv (#8395)
* Include RSSI in rangetest csv * Fix typo * Preserve csv column order --------- Co-authored-by: Ben Meadors <[email protected]>
1 parent 2674703 commit 15ee1c2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/modules/RangeTestModule.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ ProcessMessage RangeTestModuleRadio::handleReceived(const meshtastic_MeshPacket
159159
LOG_DEBUG("---- Received Packet:");
160160
LOG_DEBUG("mp.from %d", mp.from);
161161
LOG_DEBUG("mp.rx_snr %f", mp.rx_snr);
162+
LOG_DEBUG("mp.rx_rssi %f", mp.rx_rssi);
162163
LOG_DEBUG("mp.hop_limit %d", mp.hop_limit);
163164
LOG_DEBUG("---- Node Information of Received Packet (mp.from):");
164165
LOG_DEBUG("n->user.long_name %s", n->user.long_name);
@@ -234,8 +235,8 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp)
234235
}
235236

236237
// Print the CSV header
237-
if (fileToWrite.println(
238-
"time,from,sender name,sender lat,sender long,rx lat,rx long,rx elevation,rx snr,distance,hop limit,payload")) {
238+
if (fileToWrite.println("time,from,sender name,sender lat,sender long,rx lat,rx long,rx elevation,rx "
239+
"snr,distance,hop limit,payload,rx rssi")) {
239240
LOG_INFO("File was written");
240241
} else {
241242
LOG_ERROR("File write failed");
@@ -297,6 +298,8 @@ bool RangeTestModuleRadio::appendFile(const meshtastic_MeshPacket &mp)
297298

298299
// TODO: If quotes are found in the payload, it has to be escaped.
299300
fileToAppend.printf("\"%s\"\n", p.payload.bytes);
301+
fileToAppend.printf("%i,", mp.rx_rssi); // RX RSSI
302+
300303
fileToAppend.flush();
301304
fileToAppend.close();
302305

0 commit comments

Comments
 (0)