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

* fade to default path color when inactive

* long!
This commit is contained in:
Shane Smiskol
2022-11-04 21:04:53 -07:00
committed by GitHub
parent e4cd8a15db
commit 0b385a5650
2 changed files with 2 additions and 2 deletions

View File

@@ -463,7 +463,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) {
if (scene.end_to_end_long) {
const auto &acceleration = (*s->sm)["modelV2"].getModelV2().getAcceleration();
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
}
// speed up: 148, slow down: 0

View File

@@ -214,7 +214,7 @@ void UIState::updateStatus() {
UIState::UIState(QObject *parent) : QObject(parent) {
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",
"wideRoadCameraState", "managerState", "navInstruction", "navRoute", "gnssMeasurements",
});