From 685a47879715e0dc5363bd313e4e146edbc8b116 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 26 Jul 2025 06:35:55 -0500 Subject: [PATCH] Guard serial module --- src/modules/AdminModule.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/AdminModule.cpp b/src/modules/AdminModule.cpp index be692e6d1..1a9c3a7a7 100644 --- a/src/modules/AdminModule.cpp +++ b/src/modules/AdminModule.cpp @@ -43,7 +43,10 @@ #if !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_I2C #include "motion/AccelerometerThread.h" #endif +#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)) && !defined(CONFIG_IDF_TARGET_ESP32S2) && \ + !defined(CONFIG_IDF_TARGET_ESP32C3) #include "SerialModule.h" +#endif AdminModule *adminModule; bool hasOpenEditTransaction; @@ -833,11 +836,14 @@ bool AdminModule::handleSetModuleConfig(const meshtastic_ModuleConfig &c) break; case meshtastic_ModuleConfig_serial_tag: LOG_INFO("Set module config: Serial"); +#if (defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040)) && !defined(CONFIG_IDF_TARGET_ESP32S2) && \ + !defined(CONFIG_IDF_TARGET_ESP32C3) if (!SerialModule::isValidConfig(c.payload_variant.serial)) { LOG_ERROR("Invalid serial config"); return false; } disableBluetooth(); // Disable Bluetooth to prevent interference during Serial configuration +#endif moduleConfig.has_serial = true; moduleConfig.serial = c.payload_variant.serial; break;