mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* repeater: added src/dest hashes to logging
This commit is contained in:
parent
3b5b7a1642
commit
a115626afd
1 changed files with 16 additions and 2 deletions
|
|
@ -251,9 +251,16 @@ protected:
|
||||||
File f = openAppend(PACKET_LOG_FILE);
|
File f = openAppend(PACKET_LOG_FILE);
|
||||||
if (f) {
|
if (f) {
|
||||||
f.print(get_curr_time_str());
|
f.print(get_curr_time_str());
|
||||||
f.printf(": RX, len=%d (type=%d, route=%s, payload_len=%d) SNR=%d RSSI=%d score=%d\n",
|
f.printf(": RX, len=%d (type=%d, route=%s, payload_len=%d) SNR=%d RSSI=%d score=%d",
|
||||||
len, pkt->getPayloadType(), pkt->isRouteDirect() ? "D" : "F", pkt->payload_len,
|
len, pkt->getPayloadType(), pkt->isRouteDirect() ? "D" : "F", pkt->payload_len,
|
||||||
(int)_radio->getLastSNR(), (int)_radio->getLastRSSI(), (int)(score*1000));
|
(int)_radio->getLastSNR(), (int)_radio->getLastRSSI(), (int)(score*1000));
|
||||||
|
|
||||||
|
if (pkt->getPayloadType() == PAYLOAD_TYPE_PATH || pkt->getPayloadType() == PAYLOAD_TYPE_REQ
|
||||||
|
|| pkt->getPayloadType() == PAYLOAD_TYPE_RESPONSE || pkt->getPayloadType() == PAYLOAD_TYPE_TXT_MSG) {
|
||||||
|
f.printf(" [%02X -> %02X]\n", (uint32_t)pkt->payload[1], (uint32_t)pkt->payload[0]);
|
||||||
|
} else {
|
||||||
|
f.printf("\n");
|
||||||
|
}
|
||||||
f.close();
|
f.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -263,8 +270,15 @@ protected:
|
||||||
File f = openAppend(PACKET_LOG_FILE);
|
File f = openAppend(PACKET_LOG_FILE);
|
||||||
if (f) {
|
if (f) {
|
||||||
f.print(get_curr_time_str());
|
f.print(get_curr_time_str());
|
||||||
f.printf(": TX, len=%d (type=%d, route=%s, payload_len=%d)\n",
|
f.printf(": TX, len=%d (type=%d, route=%s, payload_len=%d)",
|
||||||
len, pkt->getPayloadType(), pkt->isRouteDirect() ? "D" : "F", pkt->payload_len);
|
len, pkt->getPayloadType(), pkt->isRouteDirect() ? "D" : "F", pkt->payload_len);
|
||||||
|
|
||||||
|
if (pkt->getPayloadType() == PAYLOAD_TYPE_PATH || pkt->getPayloadType() == PAYLOAD_TYPE_REQ
|
||||||
|
|| pkt->getPayloadType() == PAYLOAD_TYPE_RESPONSE || pkt->getPayloadType() == PAYLOAD_TYPE_TXT_MSG) {
|
||||||
|
f.printf(" [%02X -> %02X]\n", (uint32_t)pkt->payload[1], (uint32_t)pkt->payload[0]);
|
||||||
|
} else {
|
||||||
|
f.printf("\n");
|
||||||
|
}
|
||||||
f.close();
|
f.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue