|
|
@ -221,7 +221,7 @@ void RouteEngine::routeUpdate() { |
|
|
|
if (next_segment.isValid()) { |
|
|
|
if (next_segment.isValid()) { |
|
|
|
segment = next_segment; |
|
|
|
segment = next_segment; |
|
|
|
|
|
|
|
|
|
|
|
recompute_backoff = std::max(0, recompute_backoff - 1); |
|
|
|
recompute_backoff = 0; |
|
|
|
recompute_countdown = 0; |
|
|
|
recompute_countdown = 0; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
qWarning() << "Destination reached"; |
|
|
|
qWarning() << "Destination reached"; |
|
|
@ -294,7 +294,7 @@ void RouteEngine::recomputeRoute() { |
|
|
|
|
|
|
|
|
|
|
|
if (recompute_countdown == 0 && should_recompute) { |
|
|
|
if (recompute_countdown == 0 && should_recompute) { |
|
|
|
recompute_countdown = std::pow(2, recompute_backoff); |
|
|
|
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); |
|
|
|
calculateRoute(*new_destination); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
recompute_countdown = std::max(0, recompute_countdown - 1); |
|
|
|
recompute_countdown = std::max(0, recompute_countdown - 1); |
|
|
|