diff --git a/arch/stm32/stm32wl5e.ini b/arch/stm32/stm32wl5e.ini
index 4d5cee56d..b610bf40b 100644
--- a/arch/stm32/stm32wl5e.ini
+++ b/arch/stm32/stm32wl5e.ini
@@ -4,11 +4,11 @@ board = generic_wl5e
framework = arduino
build_type = debug
-build_flags =
+build_flags =
${arduino_base.build_flags}
-Isrc/platform/stm32wl -g
-build_src_filter =
+build_src_filter =
${arduino_base.build_src_filter} - - - - - - - - - - - - - -
lib_deps =
@@ -16,5 +16,5 @@ lib_deps =
jgromes/RadioLib@^6.0.0
https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b
-lib_ignore =
- mathertel/OneButton@^2.0.3
+lib_ignore =
+ https://github.com/mathertel/OneButton#2.1.0
diff --git a/platformio.ini b/platformio.ini
index 2040b75ce..f7af9631c 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -31,7 +31,7 @@ extra_configs =
variants/*/platformio.ini
[env]
-extra_scripts = bin/platformio-custom.py
+extra_scripts = bin/platformio-custom.py
; note: we add src to our include search path so that lmic_project_config can override
; note: TINYGPS_OPTION_NO_CUSTOM_FIELDS is VERY important. We don't use custom fields and somewhere in that pile
@@ -39,8 +39,8 @@ extra_scripts = bin/platformio-custom.py
; FIXME: fix lib/BluetoothOTA dependency back on src/ so we can remove -Isrc
; The Radiolib stuff will speed up building considerably. Exclud all the stuff we dont need.
build_flags = -Wno-missing-field-initializers
- -Wno-format
- -Isrc -Isrc/mesh -Isrc/mesh/generated -Isrc/gps -Isrc/buzz -Wl,-Map,.pio/build/output.map
+ -Wno-format
+ -Isrc -Isrc/mesh -Isrc/mesh/generated -Isrc/gps -Isrc/buzz -Wl,-Map,.pio/build/output.map
-DUSE_THREAD_NAMES
-DTINYGPS_OPTION_NO_CUSTOM_FIELDS
-DPB_ENABLE_MALLOC=1
@@ -59,8 +59,8 @@ build_flags = -Wno-missing-field-initializers
monitor_speed = 115200
lib_deps =
- https://github.com/meshtastic/esp8266-oled-ssd1306.git#b38094e03dfa964fbc0e799bc374e91a605c1223 ; ESP8266_SSD1306
- mathertel/OneButton@^2.0.3 ; OneButton library for non-blocking button debounce
+ https://github.com/meshtastic/esp8266-oled-ssd1306.git#b38094e03dfa964fbc0e799bc374e91a605c1223 ; ESP8266_SSD1306
+ https://github.com/mathertel/OneButton#2.1.0 ; OneButton library for non-blocking button debounce
https://github.com/meshtastic/arduino-fsm.git#7db3702bf0cfe97b783d6c72595e3f38e0b19159
https://github.com/meshtastic/TinyGPSPlus.git#127ad674ef85f0201cb68a065879653ed94792c4
https://github.com/meshtastic/ArduinoThread.git#72921ac222eed6f526ba1682023cee290d9aa1b3
@@ -87,14 +87,14 @@ lib_deps =
build_flags = ${env.build_flags} -Os -DRADIOLIB_SPI_PARANOID=0
build_src_filter = ${env.build_src_filter} -
-; Common libs for communicating over TCP/IP networks such as MQTT
+; Common libs for communicating over TCP/IP networks such as MQTT
[networking_base]
lib_deps =
knolleary/PubSubClient@^2.8
arduino-libraries/NTPClient@^3.1.0
arcao/Syslog@^2.0.0
-; Common libs for environmental measurements in telemetry module
+; Common libs for environmental measurements in telemetry module
; (not included in native / portduino)
[environmental_base]
lib_deps =
diff --git a/src/modules/esp32/RangeTestModule.cpp b/src/modules/esp32/RangeTestModule.cpp
index e8821f9a0..b3f03c04b 100644
--- a/src/modules/esp32/RangeTestModule.cpp
+++ b/src/modules/esp32/RangeTestModule.cpp
@@ -53,7 +53,8 @@ int32_t RangeTestModule::runOnce()
if (moduleConfig.range_test.sender) {
LOG_INFO("Initializing Range Test Module -- Sender\n");
- return (5000); // Sending first message 5 seconds after initilization.
+ started = millis(); // make a note of when we started
+ return (5000); // Sending first message 5 seconds after initilization.
} else {
LOG_INFO("Initializing Range Test Module -- Receiver\n");
return disable();
@@ -77,7 +78,13 @@ int32_t RangeTestModule::runOnce()
rangeTestModuleRadio->sendPayload();
}
- return (senderHeartbeat);
+ // If we have been running for more than 8 hours, turn module back off
+ if (millis() - started > 28800000) {
+ LOG_INFO("Range Test Module - Disabling after 8 hours\n");
+ return disable();
+ } else {
+ return (senderHeartbeat);
+ }
} else {
return disable();
// This thread does not need to run as a receiver
diff --git a/src/modules/esp32/RangeTestModule.h b/src/modules/esp32/RangeTestModule.h
index 533621d47..ae2a8f182 100644
--- a/src/modules/esp32/RangeTestModule.h
+++ b/src/modules/esp32/RangeTestModule.h
@@ -9,6 +9,7 @@
class RangeTestModule : private concurrency::OSThread
{
bool firstTime = 1;
+ unsigned long started = 0;
public:
RangeTestModule();