mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-13 00:42:07 +08:00
nav: better reroute backoff policy (#24179)
* nav: reduce max reroute backoff * remove that too
This commit is contained in:
@@ -221,7 +221,7 @@ void RouteEngine::routeUpdate() {
|
||||
if (next_segment.isValid()) {
|
||||
segment = next_segment;
|
||||
|
||||
recompute_backoff = std::max(0, recompute_backoff - 1);
|
||||
recompute_backoff = 0;
|
||||
recompute_countdown = 0;
|
||||
} else {
|
||||
qWarning() << "Destination reached";
|
||||
@@ -294,7 +294,7 @@ void RouteEngine::recomputeRoute() {
|
||||
|
||||
if (recompute_countdown == 0 && should_recompute) {
|
||||
recompute_countdown = std::pow(2, recompute_backoff);
|
||||
recompute_backoff = std::min(7, recompute_backoff + 1);
|
||||
recompute_backoff = std::min(6, recompute_backoff + 1);
|
||||
calculateRoute(*new_destination);
|
||||
} else {
|
||||
recompute_countdown = std::max(0, recompute_countdown - 1);
|
||||
|
||||
Reference in New Issue
Block a user