Refactor LoRa protocol to batch+ack with ACK-based time bootstrap

This commit is contained in:
2026-02-04 11:57:49 +01:00
parent f08d9a34d3
commit f0503af8c7
20 changed files with 326 additions and 1048 deletions

View File

@@ -1,17 +1,11 @@
#pragma once
#include <Arduino.h>
#include "lora_transport.h"
void time_receiver_init(const char *ntp_server_1, const char *ntp_server_2);
uint32_t time_get_utc();
bool time_is_synced();
void time_set_utc(uint32_t epoch);
bool time_send_timesync(uint16_t device_id_short);
bool time_handle_timesync_payload(const uint8_t *payload, size_t len);
void time_get_local_hhmm(char *out, size_t out_len);
void time_rtc_init();
bool time_try_load_from_rtc();
bool time_rtc_present();
uint32_t time_get_last_sync_utc();
uint32_t time_get_last_sync_age_sec();