| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -89,7 +89,7 @@ class CarController(): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # we can spam can to cancel the system even if we are using lat only control | 
					 | 
					 | 
					 | 
					    # we can spam can to cancel the system even if we are using lat only control | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if (frame % 3 == 0 and CS.CP.openpilotLongitudinalControl) or pcm_cancel_cmd: | 
					 | 
					 | 
					 | 
					    if (frame % 3 == 0 and CS.CP.openpilotLongitudinalControl) or pcm_cancel_cmd: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      lead = lead or CS.out.vEgo < 12.    # at low speed we always assume the lead is present do ACC can be engaged | 
					 | 
					 | 
					 | 
					      lead = lead or CS.out.vEgo < 12.    # at low speed we always assume the lead is present so ACC can be engaged | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      # Lexus IS uses a different cancellation message | 
					 | 
					 | 
					 | 
					      # Lexus IS uses a different cancellation message | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      if pcm_cancel_cmd and CS.CP.carFingerprint in [CAR.LEXUS_IS, CAR.LEXUS_RC]: | 
					 | 
					 | 
					 | 
					      if pcm_cancel_cmd and CS.CP.carFingerprint in [CAR.LEXUS_IS, CAR.LEXUS_RC]: | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -100,7 +100,7 @@ class CarController(): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      else: | 
					 | 
					 | 
					 | 
					      else: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        can_sends.append(create_accel_command(self.packer, 0, pcm_cancel_cmd, False, lead, CS.acc_type)) | 
					 | 
					 | 
					 | 
					        can_sends.append(create_accel_command(self.packer, 0, pcm_cancel_cmd, False, lead, CS.acc_type)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if frame % 2 == 0 and CS.CP.enableGasInterceptor: | 
					 | 
					 | 
					 | 
					    if frame % 2 == 0 and CS.CP.enableGasInterceptor and CS.CP.openpilotLongitudinalControl: | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      # send exactly zero if gas cmd is zero. Interceptor will send the max between read value and gas cmd. | 
					 | 
					 | 
					 | 
					      # send exactly zero if gas cmd is zero. Interceptor will send the max between read value and gas cmd. | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      # This prevents unexpected pedal range rescaling | 
					 | 
					 | 
					 | 
					      # This prevents unexpected pedal range rescaling | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      can_sends.append(create_gas_interceptor_command(self.packer, interceptor_gas_cmd, frame // 2)) | 
					 | 
					 | 
					 | 
					      can_sends.append(create_gas_interceptor_command(self.packer, interceptor_gas_cmd, frame // 2)) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |