| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -12,8 +12,8 @@ from openpilot.common.realtime import Ratekeeper | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					DUAL_CAM = os.getenv("DUAL_CAMERA") | 
					 | 
					 | 
					 | 
					DUAL_CAM = os.getenv("DUAL_CAMERA") | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					CameraType = namedtuple("CameraType", ["msg_name", "stream_type", "cam_id"]) | 
					 | 
					 | 
					 | 
					CameraType = namedtuple("CameraType", ["msg_name", "stream_type", "cam_id"]) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					CAMERAS = [ | 
					 | 
					 | 
					 | 
					CAMERAS = [ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  CameraType("roadCameraState", VisionStreamType.VISION_STREAM_ROAD, os.getenv("CAMERA_ROAD_ID", "0")), | 
					 | 
					 | 
					 | 
					  CameraType("roadCameraState", VisionStreamType.VISION_STREAM_ROAD, os.getenv("CAMERA_ROAD_ID", "/dev/video0")), | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  CameraType("driverCameraState", VisionStreamType.VISION_STREAM_DRIVER, os.getenv("CAMERA_DRIVER_ID", "1")), | 
					 | 
					 | 
					 | 
					  CameraType("driverCameraState", VisionStreamType.VISION_STREAM_DRIVER, os.getenv("CAMERA_DRIVER_ID", "/dev/video1")), | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					] | 
					 | 
					 | 
					 | 
					] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					if DUAL_CAM: | 
					 | 
					 | 
					 | 
					if DUAL_CAM: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  CAMERAS.append(CameraType("wideRoadCameraState", VisionStreamType.VISION_STREAM_WIDE_ROAD, DUAL_CAM)) | 
					 | 
					 | 
					 | 
					  CAMERAS.append(CameraType("wideRoadCameraState", VisionStreamType.VISION_STREAM_WIDE_ROAD, DUAL_CAM)) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -25,9 +25,10 @@ class Camerad: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    self.cameras = [] | 
					 | 
					 | 
					 | 
					    self.cameras = [] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    for c in CAMERAS: | 
					 | 
					 | 
					 | 
					    for c in CAMERAS: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					      print(f"opening {c.msg_name} at {c.cam_id}") | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      cam = Camera(c.msg_name, c.stream_type, c.cam_id) | 
					 | 
					 | 
					 | 
					      cam = Camera(c.msg_name, c.stream_type, c.cam_id) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      self.cameras.append(cam) | 
					 | 
					 | 
					 | 
					      self.cameras.append(cam) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      self.vipc_server.create_buffers(c.stream_type, 20, False, cam.W, cam.H) | 
					 | 
					 | 
					 | 
					      self.vipc_server.create_buffers(c.stream_type, 20, cam.W, cam.H) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    self.vipc_server.start_listener() | 
					 | 
					 | 
					 | 
					    self.vipc_server.start_listener() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |