mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 19:05:44 +00:00
Merge branch 'master' into clock_refinements
This commit is contained in:
commit
bbf50091c1
@ -559,10 +559,8 @@ void MQTT::sendSubscriptions()
|
|||||||
|
|
||||||
int32_t MQTT::runOnce()
|
int32_t MQTT::runOnce()
|
||||||
{
|
{
|
||||||
#if HAS_NETWORKING
|
|
||||||
if (!moduleConfig.mqtt.enabled || !(moduleConfig.mqtt.map_reporting_enabled || channels.anyMqttEnabled()))
|
if (!moduleConfig.mqtt.enabled || !(moduleConfig.mqtt.map_reporting_enabled || channels.anyMqttEnabled()))
|
||||||
return disable();
|
return disable();
|
||||||
|
|
||||||
bool wantConnection = wantsLink();
|
bool wantConnection = wantsLink();
|
||||||
|
|
||||||
perhapsReportToMap();
|
perhapsReportToMap();
|
||||||
@ -572,7 +570,7 @@ int32_t MQTT::runOnce()
|
|||||||
publishQueuedMessages();
|
publishQueuedMessages();
|
||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
#if HAS_NETWORKING
|
||||||
else if (!pubSub.loop()) {
|
else if (!pubSub.loop()) {
|
||||||
if (!wantConnection)
|
if (!wantConnection)
|
||||||
return 5000; // If we don't want connection now, check again in 5 secs
|
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)
|
powerFSM.trigger(EVENT_CONTACT_FROM_PHONE); // Suppress entering light sleep (because that would turn off bluetooth)
|
||||||
return 20;
|
return 20;
|
||||||
}
|
}
|
||||||
#endif
|
#else
|
||||||
|
// No networking available, return default interval
|
||||||
return 30000;
|
return 30000;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MQTT::isValidConfig(const meshtastic_ModuleConfig_MQTTConfig &config, MQTTClient *client)
|
bool MQTT::isValidConfig(const meshtastic_ModuleConfig_MQTTConfig &config, MQTTClient *client)
|
||||||
|
Loading…
Reference in New Issue
Block a user