Merge branch 'master' into develop
This commit is contained in:
+3
-3
@@ -8,15 +8,15 @@ plugins:
|
|||||||
uri: https://github.com/trunk-io/plugins
|
uri: https://github.com/trunk-io/plugins
|
||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- checkov@3.2.524
|
- checkov@3.2.525
|
||||||
- renovate@43.141.0
|
- renovate@43.142.0
|
||||||
- prettier@3.8.3
|
- prettier@3.8.3
|
||||||
- trufflehog@3.95.2
|
- trufflehog@3.95.2
|
||||||
- yamllint@1.38.0
|
- yamllint@1.38.0
|
||||||
- bandit@1.9.4
|
- bandit@1.9.4
|
||||||
- trivy@0.70.0
|
- trivy@0.70.0
|
||||||
- taplo@0.10.0
|
- taplo@0.10.0
|
||||||
- ruff@0.15.11
|
- ruff@0.15.12
|
||||||
- isort@8.0.1
|
- isort@8.0.1
|
||||||
- markdownlint@0.48.0
|
- markdownlint@0.48.0
|
||||||
- oxipng@10.1.1
|
- oxipng@10.1.1
|
||||||
|
|||||||
+1
-1
@@ -125,7 +125,7 @@ lib_deps =
|
|||||||
[device-ui_base]
|
[device-ui_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
||||||
https://github.com/meshtastic/device-ui/archive/56e1da4e7d30abcd746a2092a30e422f8cf5fc2b.zip
|
https://github.com/meshtastic/device-ui/archive/728932970996ec91bdb93cb6dae29c2cb70c66e2.zip
|
||||||
|
|
||||||
; Common libs for environmental measurements in telemetry module
|
; Common libs for environmental measurements in telemetry module
|
||||||
[environmental_base]
|
[environmental_base]
|
||||||
|
|||||||
@@ -70,20 +70,25 @@ bool GPSUpdateScheduling::isUpdateDue()
|
|||||||
// Have we been searching for a GPS position for too long?
|
// Have we been searching for a GPS position for too long?
|
||||||
bool GPSUpdateScheduling::searchedTooLong()
|
bool GPSUpdateScheduling::searchedTooLong()
|
||||||
{
|
{
|
||||||
|
constexpr uint32_t oneMinuteMs = 60UL * 1000UL;
|
||||||
|
constexpr uint32_t maxSearchClampMs = 15UL * oneMinuteMs; // Hard cap: 15 minutes is always too long
|
||||||
|
uint32_t elapsed = elapsedSearchMs();
|
||||||
|
|
||||||
|
// Anything over 15 minutes is too long, regardless of the broadcast interval.
|
||||||
|
// TODO: Make a smarter algorithm that backs off the search dwell time when not getting a lock.
|
||||||
|
if (elapsed > maxSearchClampMs)
|
||||||
|
return true;
|
||||||
|
|
||||||
uint32_t minimumOrConfiguredSecs =
|
uint32_t minimumOrConfiguredSecs =
|
||||||
Default::getConfiguredOrMinimumValue(config.position.position_broadcast_secs, default_broadcast_interval_secs);
|
Default::getConfiguredOrMinimumValue(config.position.position_broadcast_secs, default_broadcast_interval_secs);
|
||||||
uint32_t maxSearchMs = Default::getConfiguredOrDefaultMs(minimumOrConfiguredSecs, default_broadcast_interval_secs);
|
uint32_t maxSearchMs = Default::getConfiguredOrDefaultMs(minimumOrConfiguredSecs, default_broadcast_interval_secs);
|
||||||
// If broadcast interval set to max, no such thing as "too long"
|
|
||||||
if (maxSearchMs == UINT32_MAX)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// If we've been searching longer than our position broadcast interval: that's too long
|
// If we've been searching longer than our position broadcast interval: that's too long
|
||||||
else if (elapsedSearchMs() > maxSearchMs)
|
if (elapsed > maxSearchMs)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Otherwise, not too long yet!
|
// Otherwise, not too long yet!
|
||||||
else
|
return false;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updates the predicted time-to-get-lock, by exponentially smoothing the latest observation
|
// Updates the predicted time-to-get-lock, by exponentially smoothing the latest observation
|
||||||
|
|||||||
Reference in New Issue
Block a user