Add IEC62056 parsing, OLED timing, and batch LoRa send

This commit is contained in:
2026-01-28 01:22:13 +01:00
parent 449fff1f06
commit e480677b49
8 changed files with 570 additions and 65 deletions

View File

@@ -10,7 +10,8 @@ enum class DeviceRole : uint8_t {
enum class PayloadType : uint8_t {
MeterData = 0,
TestCode = 1,
TimeSync = 2
TimeSync = 2,
MeterBatch = 3
};
constexpr uint8_t PROTOCOL_VERSION = 1;
@@ -53,6 +54,9 @@ constexpr uint32_t TIME_SYNC_INTERVAL_SEC = 60;
constexpr uint32_t OLED_PAGE_INTERVAL_MS = 4000;
constexpr uint32_t OLED_AUTO_OFF_MS = 10UL * 60UL * 1000UL;
constexpr uint32_t SENDER_OLED_READ_MS = 10000;
constexpr uint32_t METER_SAMPLE_INTERVAL_MS = 1000;
constexpr uint32_t METER_SEND_INTERVAL_MS = 30000;
constexpr uint8_t METER_BATCH_MAX_SAMPLES = 30;
constexpr uint8_t NUM_SENDERS = 1;
inline constexpr uint16_t EXPECTED_SENDER_IDS[NUM_SENDERS] = {