observer self-advert on mqtt when lat/lon and custom name is set

This commit is contained in:
liquidraver committed 2026-04-05 17:21:37 +02:00
1 parent f22af597db
commit 7998b5eae3
6 files changed
+213 -1

No files matched your search

+8
View File
@@ -379,6 +379,14 @@ int main(void)
observer_mesh.getStatusTopic(),
observer_mesh.getPacketsTopic());
/* Publish self-advert once on each MQTT connect so CoreScope can pin
* this observer on the map (requires lat/lon to be configured). */
mqtt_publisher_set_connect_cb([]() {
if (s_mesh_ptr) {
s_mesh_ptr->publishSelfAdvert();
}
});
LOG_INF("Observer event loop running");
/* ========== Event loop ========== */