Enable dmoji crosshairs in gray when not enabled (#27491)

* try

* add fade back

---------

Co-authored-by: ZwX1616 <zwx1616@gmail.com>
old-commit-hash: f17ac166a325ae1f73778ac45af57fc1b23a1298
This commit is contained in:
Harald Schäfer
2023-03-03 17:48:51 -08:00
committed by GitHub
parent 6b487d936b
commit 080ac41ce0
+4 -1
View File
@@ -573,7 +573,10 @@ void AnnotatedCameraWidget::drawDriverState(QPainter &painter, const UIState *s)
const int arc_l = 133;
const float arc_t_default = 6.7;
const float arc_t_extend = 12.0;
QColor arc_color = QColor::fromRgbF(0.09, 0.945, 0.26, 0.4*(1.0-dm_fade_state)*(s->engaged()));
QColor arc_color = QColor::fromRgbF(0.545 - 0.445 * s->engaged(),
0.545 + 0.4 * s->engaged(),
0.545 - 0.285 * s->engaged(),
0.4 * (1.0 - dm_fade_state));
float delta_x = -scene.driver_pose_sins[1] * arc_l / 2;
float delta_y = -scene.driver_pose_sins[0] * arc_l / 2;
painter.setPen(QPen(arc_color, arc_t_default+arc_t_extend*fmin(1.0, scene.driver_pose_diff[1] * 5.0), Qt::SolidLine, Qt::RoundCap));