Make IEC 62056-21 meter input non-blocking

- Add RX state machine with frame buffer, timeouts, and debug counters

- Expose meter_poll_frame/meter_parse_frame and reuse existing OBIS parsing

- Use cached last-valid frame at 1 Hz sampling to avoid blocking

- Document non-blocking meter handling in README
This commit is contained in:
2026-02-02 22:03:58 +01:00
parent 8e6c64a18e
commit 237e392c02
4 changed files with 196 additions and 61 deletions

View File

@@ -5,3 +5,5 @@
void meter_init();
bool meter_read(MeterData &data);
bool meter_poll_frame(const char *&frame, size_t &len);
bool meter_parse_frame(const char *frame, size_t len, MeterData &data);