mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 02:32:23 +00:00
Refactor and consolidate time window logic (#4826)
* Refactor and consolidate windowing logic * Trunk * Fixes * More * Fix braces and remove unused now variables. There was a brace in src/mesh/RadioLibInterface.cpp that was breaking compile on some architectures. Additionally, there were some brace errors in src/modules/Telemetry/AirQualityTelemetry.cpp src/modules/Telemetry/EnvironmentTelemetry.cpp src/mesh/wifi/WiFiAPClient.cpp Move throttle include in WifiAPClient.cpp to top. Add Default.h to sleep.cpp rest of files just remove unused now variables. * Remove a couple more meows --------- Co-authored-by: Tom Fifield <tom@tomfifield.net>
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "configuration.h"
|
||||
#include "gps/GeoCoord.h"
|
||||
#include <Arduino.h>
|
||||
#include <Throttle.h>
|
||||
|
||||
RangeTestModule *rangeTestModule;
|
||||
RangeTestModuleRadio *rangeTestModuleRadio;
|
||||
@@ -79,7 +80,7 @@ int32_t RangeTestModule::runOnce()
|
||||
}
|
||||
|
||||
// If we have been running for more than 8 hours, turn module back off
|
||||
if (millis() - started > 28800000) {
|
||||
if (!Throttle::isWithinTimespanMs(started, 28800000)) {
|
||||
LOG_INFO("Range Test Module - Disabling after 8 hours\n");
|
||||
return disable();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user