nav: do not transition to next segment if we need to recompute

This commit is contained in:
Willem Melching
2021-08-12 19:50:04 +02:00
parent 1bb46d0cc8
commit 512ab3d8fb

View File

@@ -198,7 +198,7 @@ void MapWindow::timerUpdate() {
}
// Transition to next route segment
if (distance_to_maneuver < -MANEUVER_TRANSITION_THRESHOLD) {
if (!shouldRecompute() && (distance_to_maneuver < -MANEUVER_TRANSITION_THRESHOLD)) {
auto next_segment = segment.nextRouteSegment();
if (next_segment.isValid()) {
segment = next_segment;