move NVS initisalisation higher, add check for poll_id == bus ID

This commit is contained in:
proddy
2026-03-29 15:43:03 +02:00
parent 434bf483fd
commit 69a129d80e
3 changed files with 31 additions and 15 deletions

View File

@@ -39,6 +39,7 @@ const uint8_t ems_crc_table[] = {0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
uint32_t EMSbus::last_bus_activity_ = 0; // timestamp of last time a valid Rx came in
uint32_t EMSbus::bus_uptime_start_ = 0; // timestamp of when the bus was started
bool EMSbus::bus_connected_ = false; // start assuming the bus hasn't been connected
uint8_t EMSbus::poll_match_count_ = 0; // consecutive poll ID matches
uint8_t EMSbus::ems_mask_ = EMS_MASK_UNSET; // unset so its triggered when booting, the its 0x00=buderus, 0x80=junker/ht3
uint8_t EMSbus::ems_bus_id_ = EMSESP_DEFAULT_EMS_BUS_ID;
uint8_t EMSbus::tx_mode_ = EMSESP_DEFAULT_TX_MODE;