|  |  | @ -170,7 +170,7 @@ void OnroadAlerts::paintEvent(QPaintEvent *event) { | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  | } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget* parent) : fps_filter(UI_FREQ, 3, 1. / UI_FREQ), CameraWidget("camerad", type, true, parent) { |  |  |  | AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget* parent) : fps_filter(UI_FREQ, 3, 1. / UI_FREQ), accel_filter(UI_FREQ, .5, 1. / UI_FREQ), CameraWidget("camerad", type, true, parent) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   pm = std::make_unique<PubMaster, const std::initializer_list<const char *>>({"uiDebug"}); |  |  |  |   pm = std::make_unique<PubMaster, const std::initializer_list<const char *>>({"uiDebug"}); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   engage_img = loadPixmap("../assets/img_chffr_wheel.png", {img_size, img_size}); |  |  |  |   engage_img = loadPixmap("../assets/img_chffr_wheel.png", {img_size, img_size}); | 
			
		
	
	
		
		
			
				
					|  |  | @ -463,19 +463,18 @@ 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() > 16) { |  |  |  |     if (acceleration.getZ().size() > 10) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       acceleration_future = acceleration.getX()[16];  // 2.5 seconds
 |  |  |  |       acceleration_future = acceleration.getX()[10];  // 1.0 second
 | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  |     start_hue = 60; |  |  |  |     // speed up: 148, slow down: 0
 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     // speed up: 120, slow down: 0
 |  |  |  |     start_hue = fmax(fmin(60 + accel_filter.update(acceleration_future) * 80, 148), 0); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     end_hue = fmax(fmin(start_hue + acceleration_future * 30, 120), 0); |  |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     // FIXME: painter.drawPolygon can be slow if hue is not rounded
 |  |  |  |     // FIXME: painter.drawPolygon can be slow if hue is not rounded
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     end_hue = int(end_hue * 100 + 0.5) / 100; |  |  |  |     start_hue = int(start_hue * 100 + 0.5) / 100; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     bg.setColorAt(0.0, QColor::fromHslF(start_hue / 360., 0.97, 0.56, 0.4)); |  |  |  |     bg.setColorAt(0.0, QColor::fromHslF(start_hue / 360., 0.97, 0.56, 0.4)); | 
			
		
	
		
		
			
				
					
					|  |  |  |     bg.setColorAt(0.5, QColor::fromHslF(end_hue / 360., 1.0, 0.68, 0.35)); |  |  |  |     bg.setColorAt(0.75, QColor::fromHslF(63 / 360., 1.0, 0.68, 0.35)); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     bg.setColorAt(1.0, QColor::fromHslF(end_hue / 360., 1.0, 0.68, 0.0)); |  |  |  |     bg.setColorAt(1.0, QColor::fromHslF(63 / 360., 1.0, 0.68, 0.0)); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   } else { |  |  |  |   } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |     const auto &orientation = (*s->sm)["modelV2"].getModelV2().getOrientation(); |  |  |  |     const auto &orientation = (*s->sm)["modelV2"].getModelV2().getOrientation(); | 
			
		
	
		
		
			
				
					
					|  |  |  |     float orientation_future = 0; |  |  |  |     float orientation_future = 0; | 
			
		
	
	
		
		
			
				
					|  |  | 
 |