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 c18132b73e.

* add initialized

* clip to 10 m/s

* fix bug

* rm

* here?
pull/29615/head
Shane Smiskol 2 years ago committed by GitHub
parent e7418cfa39
commit b8fb260558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/ui/qt/maps/map.cc

@ -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]));
}
}

Loading…
Cancel
Save