feat(core): capture per-packet RSSI at RX (Packet::_rssi)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 4.8 committed 2026-07-12 00:19:20 +02:00
1 parent 1ca85f8071
commit 9307940d04
2 files changed
+3

No files matched your search

+1
View File
@@ -203,6 +203,7 @@ void Dispatcher::checkRecv() {
} else {
if (tryParsePacket(pkt, raw, len)) {
pkt->_snr = _radio->getLastSNR() * 4.0f;
pkt->_rssi = (int8_t)_radio->getLastRSSI();
score = _radio->packetScore(_radio->getLastSNR(), len);
air_time = _radio->getEstAirtimeFor(len);
rx_air_time += air_time;
+2
View File
@@ -49,6 +49,7 @@ public:
uint8_t path[MAX_PATH_SIZE];
uint8_t payload[MAX_PACKET_PAYLOAD];
int8_t _snr;
int8_t _rssi; // CUSTOM (TeTeHacko): last-hop RSSI (dBm) captured at RX, for the passive mesh analyzer
/**
* \brief calculate the hash of payload + type
@@ -90,6 +91,7 @@ public:
bool isMarkedDoNotRetransmit() const { return header == 0xFF; }
float getSNR() const { return ((float)_snr) / 4.0f; }
int getRSSI() const { return _rssi; }
/**
* \returns the encoded/wire format length of this packet