From b8fb26055825f4ee35f647b6d84c2e6e6878a93f Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 24 Aug 2023 15:09:30 -0700 Subject: [PATCH] ui/map: clip vehicle speed to min of 10 m/s (#29601) * all the changes I want to make * Revert "all the changes I want to make" This reverts commit c18132b73eb9bba4d7871631d7cd4155eb7efcd0. * add initialized * clip to 10 m/s * fix bug * rm * here? --- selfdrive/ui/qt/maps/map.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/maps/map.cc b/selfdrive/ui/qt/maps/map.cc index 162fc799ad..d5e81bc9e0 100644 --- a/selfdrive/ui/qt/maps/map.cc +++ b/selfdrive/ui/qt/maps/map.cc @@ -1,5 +1,6 @@ #include "selfdrive/ui/qt/maps/map.h" +#include #include #include @@ -151,7 +152,7 @@ void MapWindow::updateState(const UIState &s) { if (locationd_valid) { last_position = QMapbox::Coordinate(locationd_pos.getValue()[0], locationd_pos.getValue()[1]); last_bearing = RAD2DEG(locationd_orientation.getValue()[2]); - velocity_filter.update(locationd_velocity.getValue()[0]); + velocity_filter.update(std::max(10.0, locationd_velocity.getValue()[0])); } }