Merge pull request #1559 from mc-hamster/master

fix comments in smart position
raytac-diy
Jm Casler 2022-07-16 07:58:21 -07:00 zatwierdzone przez GitHub
commit ca8e307976
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -177,8 +177,8 @@ int32_t PositionModule::runOnce()
// Yes, this has a bunch of magic numbers. Sorry.
uint32_t timeTravel =
((1500 / myNodeInfo.bitrate) >= timeTravelMinimum) ? (1500 / myNodeInfo.bitrate) : timeTravelMinimum;
// If the distance traveled since the last update is greater than 100 meters
// and it's been at least 60 seconds since the last update
// If the distance traveled since the last update is greater than distanceTravelMinimum meters
// and it's been at least timeTravelMinimum seconds since the last update
if ((abs(distance) >= distanceTravelThreshold) && (now - lastGpsSend) >= (timeTravel * 1000)) {
bool requestReplies = currentGeneration != radioGeneration;
currentGeneration = radioGeneration;