nav: better reroute backoff policy (#24179)

* nav: reduce max reroute backoff

* remove that too
old-commit-hash: fcf657763d
taco
Adeeb Shihadeh 3 years ago committed by GitHub
parent 0681a415e9
commit b747791691
  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