mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-19 17:22:59 +00:00
Fix missing IFNDEF and IFDEF in main-esp32.cpp when EXCLUDE_WIFI is defined.
Moved IFDEF HAS_NETWORK to beginning of MQTT:runOnce (to catch when EXCLUDE_WIFI is defined)
This commit is contained in:
@@ -396,6 +396,7 @@ bool MQTT::wantsLink() const
|
||||
|
||||
int32_t MQTT::runOnce()
|
||||
{
|
||||
#ifdef HAS_NETWORKING
|
||||
if (!moduleConfig.mqtt.enabled || !(moduleConfig.mqtt.map_reporting_enabled || channels.anyMqttEnabled()))
|
||||
return disable();
|
||||
|
||||
@@ -408,7 +409,7 @@ int32_t MQTT::runOnce()
|
||||
publishQueuedMessages();
|
||||
return 200;
|
||||
}
|
||||
#ifdef HAS_NETWORKING
|
||||
|
||||
else if (!pubSub.loop()) {
|
||||
if (!wantConnection)
|
||||
return 5000; // If we don't want connection now, check again in 5 secs
|
||||
|
||||
Reference in New Issue
Block a user