From 5e8827c128c4ab869760b48aaa97ec43d4c18265 Mon Sep 17 00:00:00 2001 From: Johnathon Slightham Date: Tue, 6 Jan 2026 17:19:48 -0500 Subject: [PATCH] Add back leader update --- components/rpc/CommunicationRouter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/rpc/CommunicationRouter.cpp b/components/rpc/CommunicationRouter.cpp index e602f74..8d80b3d 100644 --- a/components/rpc/CommunicationRouter.cpp +++ b/components/rpc/CommunicationRouter.cpp @@ -34,6 +34,13 @@ CommunicationRouter::~CommunicationRouter() { vTaskDelete(m_router_thread); } const auto that = static_cast(args); while (true) { + if (std::chrono::system_clock::now() - that->m_last_leader_updated > + std::chrono::seconds(15)) { + that->m_last_leader_updated = std::chrono::system_clock::now(); + ESP_LOGI(TAG, "Updating leader"); + that->update_leader(); + } + for (uint8_t channel = 0; channel < MODULE_TO_NUM_CHANNELS_MAP[that->m_config_manager.get_module_type()];