mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 14:42:05 +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:
parent
1f9f885aca
commit
a5c96a29d5
@ -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
|
||||
|
@ -24,7 +24,12 @@
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH
|
||||
void setBluetoothEnable(bool enable)
|
||||
{
|
||||
#ifndef MESHTASTIC_EXCLUDE_WIFI
|
||||
if (!isWifiAvailable() && config.bluetooth.enabled == true) {
|
||||
#endif
|
||||
#ifdef MESHTASTIC_EXCLUDE_WIFI
|
||||
if (config.bluetooth.enabled == true) {
|
||||
#endif
|
||||
if (!nimbleBluetooth) {
|
||||
nimbleBluetooth = new NimbleBluetooth();
|
||||
}
|
||||
@ -214,8 +219,8 @@ void cpuDeepSleep(uint32_t msecToWake)
|
||||
#endif
|
||||
|
||||
// Not needed because both of the current boards have external pullups
|
||||
// FIXME change polarity in hw so we can wake on ANY_HIGH instead - that would allow us to use all three buttons (instead of
|
||||
// just the first) gpio_pullup_en((gpio_num_t)BUTTON_PIN);
|
||||
// FIXME change polarity in hw so we can wake on ANY_HIGH instead - that would allow us to use all three buttons (instead
|
||||
// of just the first) gpio_pullup_en((gpio_num_t)BUTTON_PIN);
|
||||
|
||||
#if SOC_PM_SUPPORT_EXT_WAKEUP
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
|
Loading…
Reference in New Issue
Block a user