From 30d4c3a94587e6b8bdb91a2801a68ef7bda84f50 Mon Sep 17 00:00:00 2001 From: David Ellefsen Date: Mon, 22 Apr 2024 10:47:11 +0200 Subject: [PATCH 1/2] Updates for esp32s2 build --- arch/esp32/esp32s2.ini | 7 +++++-- src/modules/esp32/PaxcounterModule.cpp | 2 +- src/sleep.cpp | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/esp32/esp32s2.ini b/arch/esp32/esp32s2.ini index 5de0fa549..df66de2ed 100644 --- a/arch/esp32/esp32s2.ini +++ b/arch/esp32/esp32s2.ini @@ -2,14 +2,17 @@ extends = esp32_base build_src_filter = - ${esp32_base.build_src_filter} - - + ${esp32_base.build_src_filter} - - - monitor_speed = 115200 build_flags = ${esp32_base.build_flags} -DHAS_BLUETOOTH=0 + -DMESHTASTIC_EXCLUDE_PAXCOUNTER + -DMESHTASTIC_EXCLUDE_BLUETOOTH lib_ignore = ${esp32_base.lib_ignore} - NimBLE-Arduino \ No newline at end of file + NimBLE-Arduino + libpax \ No newline at end of file diff --git a/src/modules/esp32/PaxcounterModule.cpp b/src/modules/esp32/PaxcounterModule.cpp index aad7b5d63..b9fdfcb63 100644 --- a/src/modules/esp32/PaxcounterModule.cpp +++ b/src/modules/esp32/PaxcounterModule.cpp @@ -1,5 +1,5 @@ #include "configuration.h" -#if defined(ARCH_ESP32) +#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_PAXCOUNTER #include "Default.h" #include "MeshService.h" #include "PaxcounterModule.h" diff --git a/src/sleep.cpp b/src/sleep.cpp index e58c3872a..fe73a755c 100644 --- a/src/sleep.cpp +++ b/src/sleep.cpp @@ -211,7 +211,7 @@ void doDeepSleep(uint32_t msecToWake, bool skipPreflight = false) // esp_wifi_stop(); waitEnterSleep(skipPreflight); -#ifdef ARCH_ESP32 +#if defined(ARCH_ESP32) && !MESHTASTIC_EXCLUDE_BLUETOOTH // Full shutdown of bluetooth hardware if (nimbleBluetooth) nimbleBluetooth->deinit(); From 250cf16bf8793aefed95b9cedb9c20b2f2e7a2a7 Mon Sep 17 00:00:00 2001 From: Andrew Yong Date: Mon, 22 Apr 2024 21:21:50 +0800 Subject: [PATCH 2/2] Add ability to turn off heartbeat LED blinking (#3674) * Add ability to turn off status LED blinking Fixes #3635 and depends on [protobufs PR #485](https://github.com/meshtastic/protobufs/pull/485) Signed-off-by: Andrew Yong * led_heartbeat_disabled * trunk --------- Signed-off-by: Andrew Yong Co-authored-by: Ben Meadors --- src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index b1a15634f..f40fd0789 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -179,6 +179,11 @@ const char *getDeviceName() static int32_t ledBlinker() { + // Still set up the blinking (heartbeat) interval but skip code path below, so LED will blink if + // config.device.led_heartbeat_disabled is changed + if (config.device.led_heartbeat_disabled) + return 1000; + static bool ledOn; ledOn ^= 1; @@ -1001,4 +1006,4 @@ void loop() mainDelay.delay(delayMsec); } // if (didWake) LOG_DEBUG("wake!\n"); -} \ No newline at end of file +}