Add multiple configuration options for a minimized build (GPS,WiFi,BT,MQTT,Screen). (#3469)

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Jim Whitelaw
2024-03-25 05:33:57 -06:00
committed by GitHub
parent 728b58fb94
commit acc32916c3
31 changed files with 226 additions and 87 deletions

View File

@@ -3,11 +3,14 @@
#include "esp_task_wdt.h"
#include "main.h"
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH
#include "BleOta.h"
#include "nimble/NimbleBluetooth.h"
#endif
#include "BleOta.h"
#if !MESHTASTIC_EXCLUDE_WIFI
#include "mesh/wifi/WiFiAPClient.h"
#endif
#include "meshUtils.h"
#include "sleep.h"
@@ -18,8 +21,7 @@
#include <nvs.h>
#include <nvs_flash.h>
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !MESHTASTIC_EXCLUDE_BLUETOOTH
void setBluetoothEnable(bool enable)
{
if (!isWifiAvailable() && config.bluetooth.enabled == true) {
@@ -108,12 +110,16 @@ void esp32Setup()
preferences.putUInt("rebootCounter", rebootCounter);
preferences.end();
LOG_DEBUG("Number of Device Reboots: %d\n", rebootCounter);
#if !MESHTASTIC_EXCLUDE_BLUETOOTH
String BLEOTA = BleOta::getOtaAppVersion();
if (BLEOTA.isEmpty()) {
LOG_DEBUG("No OTA firmware available\n");
} else {
LOG_DEBUG("OTA firmware version %s\n", BLEOTA.c_str());
}
#else
LOG_DEBUG("No OTA firmware available\n");
#endif
// enableModemSleep();