Add LoRa telemetry, fault counters, and time sync status

This commit is contained in:
2026-01-30 13:00:16 +01:00
parent 7e3b537e49
commit 8ba7675a1c
13 changed files with 437 additions and 21 deletions

View File

@@ -50,8 +50,8 @@ bool lora_send(const LoraPacket &pkt) {
LoRa.beginPacket();
LoRa.write(buffer, idx);
LoRa.endPacket();
return true;
int result = LoRa.endPacket();
return result == 1;
}
bool lora_receive(LoraPacket &pkt, uint32_t timeout_ms) {
@@ -91,6 +91,8 @@ bool lora_receive(LoraPacket &pkt, uint32_t timeout_ms) {
return false;
}
memcpy(pkt.payload, &buffer[5], pkt.payload_len);
pkt.rssi_dbm = static_cast<int16_t>(LoRa.packetRssi());
pkt.snr_db = LoRa.packetSnr();
return true;
}