mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +08:00
nav ui: restore speed-adaptive map zoom level (#28796)
Revert "map: fix repeated call to m_map->setZoom (#25784)"
This reverts commit 00cc1831bb13d838ba5df4fdfc6c071f7c704493.
old-commit-hash: e816c81a5a
This commit is contained in:
@@ -194,8 +194,7 @@ void MapWindow::updateState(const UIState &s) {
|
||||
|
||||
if (zoom_counter == 0) {
|
||||
m_map->setZoom(util::map_val<float>(velocity_filter.x(), 0, 30, MAX_ZOOM, MIN_ZOOM));
|
||||
zoom_counter = -1;
|
||||
} else if (zoom_counter > 0) {
|
||||
} else {
|
||||
zoom_counter--;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ private:
|
||||
// Panning
|
||||
QPointF m_lastPos;
|
||||
int pan_counter = 0;
|
||||
int zoom_counter = -1;
|
||||
int zoom_counter = 0;
|
||||
|
||||
// Position
|
||||
std::optional<QMapbox::Coordinate> last_position;
|
||||
|
||||
Reference in New Issue
Block a user