mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-23 05:11:24 +00:00
observer self-advert on mqtt when lat/lon and custom name is set
This commit is contained in:
1 parent
f22af597db
commit
7998b5eae3
6 files changed
+213
-1
No files matched your search
@@ -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 ========== */
|
||||
|
||||
Reference in new issue
Block a user