diff --git a/platformio.ini b/platformio.ini index 9d15a9ff7..2fea56967 100644 --- a/platformio.ini +++ b/platformio.ini @@ -54,6 +54,7 @@ build_flags = -Wno-missing-field-initializers -DRADIOLIB_EXCLUDE_LORAWAN=1 -DMESHTASTIC_EXCLUDE_DROPZONE=1 -DMESHTASTIC_EXCLUDE_REPLYBOT=1 + -DMESHTASTIC_EXCLUDE_RANGETEST=1 -DMESHTASTIC_EXCLUDE_REMOTEHARDWARE=1 -DMESHTASTIC_EXCLUDE_HEALTH_TELEMETRY=1 -DMESHTASTIC_EXCLUDE_POWERSTRESS=1 ; exclude power stress test module from main firmware diff --git a/src/main.cpp b/src/main.cpp index f612a3bf0..37ab56bc8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1279,6 +1279,8 @@ extern meshtastic_DeviceMetadata getDeviceMetadata() #if !defined(HAS_RGB_LED) && !RAK_4631 deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_AMBIENTLIGHTING_CONFIG; #endif + // Range test is always excluded as of 2.8 + deviceMetadata.excluded_modules |= meshtastic_ExcludedModules_RANGETEST_CONFIG; // No bluetooth on these targets (yet): // Pico W / 2W may get it at some point diff --git a/src/modules/RangeTestModule.cpp b/src/modules/RangeTestModule.cpp index dad748699..2ca589131 100644 --- a/src/modules/RangeTestModule.cpp +++ b/src/modules/RangeTestModule.cpp @@ -8,15 +8,16 @@ * The RangeTestModule class is an OSThread that runs the module. * The RangeTestModuleRadio class handles sending and receiving packets. */ -#include "RangeTestModule.h" +#include "configuration.h" +#if !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS #include "FSCommon.h" #include "MeshService.h" #include "NodeDB.h" #include "PowerFSM.h" +#include "RangeTestModule.h" #include "Router.h" #include "SPILock.h" #include "airtime.h" -#include "configuration.h" #include "gps/GeoCoord.h" #include "gps/RTC.h" #include @@ -353,3 +354,5 @@ bool RangeTestModuleRadio::removeFile() return 0; #endif } + +#endif // !MESHTASTIC_EXCLUDE_RANGETEST && !MESHTASTIC_EXCLUDE_GPS diff --git a/variants/esp32/esp32.ini b/variants/esp32/esp32.ini index 2026dcfdb..2c21f81bf 100644 --- a/variants/esp32/esp32.ini +++ b/variants/esp32/esp32.ini @@ -19,7 +19,6 @@ build_flags = -DMESHTASTIC_EXCLUDE_ACCELEROMETER=1 -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1 -DMESHTASTIC_EXCLUDE_WEBSERVER=1 - -DMESHTASTIC_EXCLUDE_RANGETEST=1 ; HACK HACK HACK this is just a proof of concept ESP32+NimBLE but these ; includes need to be done properly somehow ; Quotes keep Windows packages_dir backslashes intact through POSIX flag parsing diff --git a/variants/esp32/rak11200/platformio.ini b/variants/esp32/rak11200/platformio.ini index b48d638fb..2abb9730f 100644 --- a/variants/esp32/rak11200/platformio.ini +++ b/variants/esp32/rak11200/platformio.ini @@ -18,6 +18,5 @@ build_flags = -I variants/esp32/rak11200 -DMESHTASTIC_EXCLUDE_WEBSERVER=1 -DMESHTASTIC_EXCLUDE_PAXCOUNTER=1 - -DMESHTASTIC_EXCLUDE_RANGETEST=1 -DMESHTASTIC_EXCLUDE_MQTT=1 upload_speed = 115200 diff --git a/variants/stm32/stm32.ini b/variants/stm32/stm32.ini index ef613134b..ea8673d77 100644 --- a/variants/stm32/stm32.ini +++ b/variants/stm32/stm32.ini @@ -27,7 +27,6 @@ build_flags = -DMESHTASTIC_EXCLUDE_TZ=1 ; Exclude TZ to save some flash space. -DMESHTASTIC_EXCLUDE_XEDDSA=1 ; Individual STM32WL variants opt in after size validation. -DMESHTASTIC_EXCLUDE_PKT_HISTORY_HASH=1 - -DMESHTASTIC_EXCLUDE_RANGETEST=1 -DMESHTASTIC_EXCLUDE_WAYPOINT=1 -DMESHTASTIC_EXCLUDE_POWER_TELEMETRY=1 -DSERIAL_RX_BUFFER_SIZE=256 ; For GPS - the default of 64 is too small.