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?
This commit is contained in:
Shane Smiskol
2023-08-24 15:09:30 -07:00
committed by GitHub
parent e7418cfa39
commit b8fb260558
+2 -1
View File
@@ -1,5 +1,6 @@
#include "selfdrive/ui/qt/maps/map.h"
#include <algorithm>
#include <eigen3/Eigen/Dense>
#include <QDebug>
@@ -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]));
}
}