ui: fade to default path color when inactive (#26375)

* fade to default path color when inactive

* long!
old-commit-hash: 0b385a5650
taco
Shane Smiskol 3 years ago committed by GitHub
parent 6817dc2abe
commit b79c186192
  1. 2
      selfdrive/ui/qt/onroad.cc
  2. 2
      selfdrive/ui/ui.cc

@ -463,7 +463,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
if (scene.end_to_end_long) { if (scene.end_to_end_long) {
const auto &acceleration = (*s->sm)["modelV2"].getModelV2().getAcceleration(); const auto &acceleration = (*s->sm)["modelV2"].getModelV2().getAcceleration();
float acceleration_future = 0; float acceleration_future = 0;
if (acceleration.getZ().size() > 10) { if (acceleration.getZ().size() > 10 && (*s->sm)["carControl"].getCarControl().getLongActive()) {
acceleration_future = acceleration.getX()[10]; // 1.0 second acceleration_future = acceleration.getX()[10]; // 1.0 second
} }
// speed up: 148, slow down: 0 // speed up: 148, slow down: 0

@ -214,7 +214,7 @@ void UIState::updateStatus() {
UIState::UIState(QObject *parent) : QObject(parent) { UIState::UIState(QObject *parent) : QObject(parent) {
sm = std::make_unique<SubMaster, const std::initializer_list<const char *>>({ sm = std::make_unique<SubMaster, const std::initializer_list<const char *>>({
"modelV2", "controlsState", "liveCalibration", "radarState", "deviceState", "roadCameraState", "modelV2", "carControl", "controlsState", "liveCalibration", "radarState", "deviceState", "roadCameraState",
"pandaStates", "carParams", "driverMonitoringState", "carState", "liveLocationKalman", "pandaStates", "carParams", "driverMonitoringState", "carState", "liveLocationKalman",
"wideRoadCameraState", "managerState", "navInstruction", "navRoute", "gnssMeasurements", "wideRoadCameraState", "managerState", "navInstruction", "navRoute", "gnssMeasurements",
}); });

Loading…
Cancel
Save