diff --git a/tools/mota/pio_endf.py b/tools/mota/pio_endf.py index 998197bfb..b45eedcde 100644 --- a/tools/mota/pio_endf.py +++ b/tools/mota/pio_endf.py @@ -28,11 +28,15 @@ import motalib as ml def _ota_enabled() -> bool: + disabled = False + enabled = False for d in env.get("CPPDEFINES", []): # noqa: F821 name = d[0] if isinstance(d, (list, tuple)) else d + if name == "DISABLE_LORA_OTA": + disabled = True if name == "ENABLE_OTA": - return True - return False + enabled = True + return enabled and not disabled def _is_nrf52() -> bool: diff --git a/variants/rak4631/platformio.ini b/variants/rak4631/platformio.ini index 2c3407b08..50613c5f7 100644 --- a/variants/rak4631/platformio.ini +++ b/variants/rak4631/platformio.ini @@ -48,6 +48,7 @@ lib_deps = extends = rak4631 build_flags = ${rak4631.build_flags} + -D DISABLE_LORA_OTA=1 ; Cascade repeater image exceeds the safe nRF52 in-place OTA ceiling -D DISPLAY_CLASS=SSD1306Display -D ADVERT_NAME='"RAK4631 Repeater"' -D ADVERT_LAT=0.0 @@ -59,7 +60,7 @@ build_flags = ; -D MESH_DEBUG=1 build_src_filter = ${rak4631.build_src_filter} + - ; OTA (ENABLE_OTA + flash store + EndF + helpers/ota) is inherited from the [rak4631] base now + ; The OTA sources remain inherited, but build.sh removes ENABLE_OTA for this oversized role. +<../examples/simple_repeater> [env:RAK_4631_repeater_bridge_rs232_serial1]