Merge branch 'master' into picomputer-s3

This commit is contained in:
Ben Meadors 2023-05-16 10:38:12 -05:00 committed by GitHub
commit ae41944a89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 13 deletions

View File

@ -17,4 +17,4 @@ lib_deps =
https://github.com/kokke/tiny-AES-c.git#f06ac37fc31dfdaca2e0d9bec83f90d5663c319b
lib_ignore =
mathertel/OneButton@^2.0.3
https://github.com/mathertel/OneButton#2.1.0

View File

@ -60,7 +60,7 @@ 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/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

View File

@ -53,6 +53,7 @@ int32_t RangeTestModule::runOnce()
if (moduleConfig.range_test.sender) {
LOG_INFO("Initializing Range Test Module -- Sender\n");
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");
@ -77,7 +78,13 @@ int32_t RangeTestModule::runOnce()
rangeTestModuleRadio->sendPayload();
}
// 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

View File

@ -9,6 +9,7 @@
class RangeTestModule : private concurrency::OSThread
{
bool firstTime = 1;
unsigned long started = 0;
public:
RangeTestModule();