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

@@ -1,17 +1,23 @@
#include "sleep.h"
#include "configuration.h"
#if !MESHTASTIC_EXCLUDE_GPS
#include "GPS.h"
#endif
#include "MeshRadio.h"
#include "MeshService.h"
#include "NodeDB.h"
#include "configuration.h"
#include "error.h"
#include "main.h"
#include "sleep.h"
#include "target_specific.h"
#ifdef ARCH_ESP32
#include "esp32/pm.h"
#include "esp_pm.h"
#if !MESHTASTIC_EXCLUDE_WIFI
#include "mesh/wifi/WiFiAPClient.h"
#endif
#include "rom/rtc.h"
#include <driver/rtc_io.h>
#include <driver/uart.h>
@@ -48,7 +54,7 @@ RTC_DATA_ATTR int bootCount = 0;
*/
void setCPUFast(bool on)
{
#ifdef ARCH_ESP32
#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_WIFI
if (isWifiAvailable()) {
/*
@@ -206,11 +212,11 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false)
// pinMode(PIN_POWER_EN1, INPUT_PULLDOWN);
#endif
#endif
#if HAS_GPS
// Kill GPS power completely (even if previously we just had it in sleep mode)
if (gps)
gps->setGPSPower(false, false, 0);
#endif
setLed(false);
#ifdef RESET_OLED