From 31d56c16d57bca9817f80872e2f3010382446bfd Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Mon, 14 Jul 2025 20:13:34 -0500 Subject: [PATCH] Map report should work over devices which do not have network hardware (with client proxy) (#7341) * Map report should work over devices which do not have network hardware (with client proxy) * Fix else --- src/mqtt/MQTT.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index 137c92056..091612827 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -559,10 +559,8 @@ void MQTT::sendSubscriptions() int32_t MQTT::runOnce() { -#if HAS_NETWORKING if (!moduleConfig.mqtt.enabled || !(moduleConfig.mqtt.map_reporting_enabled || channels.anyMqttEnabled())) return disable(); - bool wantConnection = wantsLink(); perhapsReportToMap(); @@ -572,7 +570,7 @@ int32_t MQTT::runOnce() publishQueuedMessages(); return 200; } - +#if HAS_NETWORKING else if (!pubSub.loop()) { if (!wantConnection) return 5000; // If we don't want connection now, check again in 5 secs @@ -596,8 +594,10 @@ int32_t MQTT::runOnce() powerFSM.trigger(EVENT_CONTACT_FROM_PHONE); // Suppress entering light sleep (because that would turn off bluetooth) return 20; } -#endif +#else + // No networking available, return default interval return 30000; +#endif } bool MQTT::isValidConfig(const meshtastic_ModuleConfig_MQTTConfig &config, MQTTClient *client)