nav: better reroute backoff policy (#24179)

* nav: reduce max reroute backoff

* remove that too
pull/24180/head
Adeeb Shihadeh 3 years ago committed by GitHub
parent cc8430b668
commit fcf657763d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      selfdrive/ui/navd/route_engine.cc

@ -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);

Loading…
Cancel
Save