* repeater and room server: MESH_PACKET_LOGGING, now dumps RAW: rx packet contents

* Dispatcher: MESH_PACKET_LOGGING,  added " hash={packet-hash}"
This commit is contained in:
Scott Powell 2025-03-09 20:36:49 +11:00
parent f77a6944f9
commit 3778c0a8ff
4 changed files with 25 additions and 1 deletions

View file

@ -264,6 +264,15 @@ protected:
return _prefs.airtime_factor;
}
void logRxRaw(float snr, float rssi, const uint8_t raw[], int len) override {
#if MESH_PACKET_LOGGING
Serial.print(getLogDateTime());
Serial.print(" RAW: ");
mesh::Utils::printHex(Serial, raw, len);
Serial.println();
#endif
}
int calcRxDelay(float score, uint32_t air_time) const override {
if (_prefs.rx_delay_base <= 0.0f) return 0;
return (int) ((pow(_prefs.rx_delay_base, 0.85f - score) - 1.0) * air_time);