Add RX reject reasons to telemetry and UI

BACKWARD-INCOMPATIBLE: MeterBatch schema bumped to v2 with err_rx_reject.
- Track and log RX reject reasons (CRC/protocol/role/payload/length/id/batch)
- Include rx_reject in sender telemetry JSON and receiver web UI
- Add lora_receive reject reason logging under SERIAL_DEBUG_MODE
This commit is contained in:
2026-02-04 01:01:49 +01:00
parent 0e7214d606
commit 1024aa3dd0
10 changed files with 143 additions and 27 deletions

View File

@@ -2,6 +2,7 @@
#include <Arduino.h>
#include "config.h"
#include "data_model.h"
constexpr size_t LORA_MAX_PAYLOAD = 230;
@@ -19,6 +20,7 @@ struct LoraPacket {
void lora_init();
bool lora_send(const LoraPacket &pkt);
bool lora_receive(LoraPacket &pkt, uint32_t timeout_ms);
RxRejectReason lora_get_last_rx_reject_reason();
void lora_idle();
void lora_sleep();
void lora_receive_continuous();