From 7f57d1f955767093360def50fa9865ad0cda89b6 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 20 Feb 2023 18:21:33 -0800 Subject: [PATCH] use linear accel -> saturation (red -> green transition is more gradual, should be easier to understand) --- selfdrive/ui/qt/onroad.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 52f3bb2dd2..e7d21ebe6b 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -559,8 +559,7 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) { // speed up: 120, slow down: 0 end_hue = fmax(fmin(start_hue + acceleration_future * 35, 148), 0); - float saturation = lerp(0, 1, pow(std::abs(3 * acceleration_future), 2) / 3); -// float saturation = pow(std::abs(acceleration_future), 2); + float saturation = std::abs(acceleration_future); saturation = saturation > 1 ? 1. : saturation; float lightness = lerp(0.95, 0.62, saturation); // lightness = lerp(0.56, 0.88, lin_grad_point);