From eaa7e21bc772d89b3ee722e6613948e82844bb28 Mon Sep 17 00:00:00 2001 From: Oliver Seiler Date: Mon, 29 Apr 2024 13:57:54 +1200 Subject: [PATCH] exclude AccelerometerThread when MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR is set --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index c2c824968..dbd470378 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -197,7 +197,9 @@ uint32_t timeLastPowered = 0; static Periodic *ledPeriodic; static OSThread *powerFSMthread; +#if !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR static OSThread *accelerometerThread; +#endif static OSThread *ambientLightingThread; SPISettings spiSettings(4000000, MSBFIRST, SPI_MODE0); @@ -604,7 +606,7 @@ void setup() screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64 #endif -#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) +#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !(MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR) if (acc_info.type != ScanI2C::DeviceType::NONE) { config.display.wake_on_tap_or_motion = true; moduleConfig.external_notification.enabled = true;