|
|
|
@ -540,15 +540,11 @@ void AnnotatedCameraWidget::drawLaneLines(QPainter &painter, const UIState *s) { |
|
|
|
|
// speed up: 120, slow down: 0
|
|
|
|
|
float path_hue = fmax(fmin(60 + acceleration[i] * 35, 120), 0); |
|
|
|
|
// FIXME: painter.drawPolygon can be slow if hue is not rounded
|
|
|
|
|
// path_hue = int(path_hue * 100 + 0.5) / 100;
|
|
|
|
|
path_hue = qRound(path_hue * 100) / 100; |
|
|
|
|
path_hue = int(path_hue * 100 + 0.5) / 100; |
|
|
|
|
|
|
|
|
|
float saturation = fmin(fabs(acceleration[i] * 1.5), 1); |
|
|
|
|
float lightness = interp1d(saturation, 0.0, 1.0, 0.95, 0.62); // lighter when grey
|
|
|
|
|
float alpha = interp1d(lin_grad_point, 0.75 / 2., 0.75, 0.4, 0.0); // matches previous alpha fade
|
|
|
|
|
// (void(alpha));
|
|
|
|
|
// (void(lightness));
|
|
|
|
|
lin_grad_point = qRound(lin_grad_point * 100) / 100.; |
|
|
|
|
bg.setColorAt(lin_grad_point, QColor::fromHslF(path_hue / 360., saturation, lightness, alpha)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -676,7 +672,7 @@ void AnnotatedCameraWidget::paintGL() { |
|
|
|
|
} else if (v_ego > 15) { |
|
|
|
|
wide_cam_requested = false; |
|
|
|
|
} |
|
|
|
|
wide_cam_requested = wide_cam_requested && sm["controlsState"].getControlsState().getExperimentalMode(); |
|
|
|
|
wide_cam_requested = wide_cam_requested && sm["controlsState"].getControlsState().getExperimentalMode() && false; |
|
|
|
|
// TODO: also detect when ecam vision stream isn't available
|
|
|
|
|
// for replay of old routes, never go to widecam
|
|
|
|
|
wide_cam_requested = wide_cam_requested && s->scene.calibration_wide_valid; |
|
|
|
|