| 
						
						
						
					 | 
					 | 
					@ -1,4 +1,4 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from selfdrive.car.honda.values import HONDA_BOSCH, CAR, CarControllerParams | 
					 | 
					 | 
					 | 
					from selfdrive.car.honda.values import HondaFlags, HONDA_BOSCH, CAR, CarControllerParams | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from selfdrive.config import Conversions as CV | 
					 | 
					 | 
					 | 
					from selfdrive.config import Conversions as CV | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					# CAN bus layout with relay | 
					 | 
					 | 
					 | 
					# CAN bus layout with relay | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -98,14 +98,14 @@ def create_bosch_supplemental_1(packer, car_fingerprint, idx): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  return packer.make_can_msg("BOSCH_SUPPLEMENTAL_1", bus, values, idx) | 
					 | 
					 | 
					 | 
					  return packer.make_can_msg("BOSCH_SUPPLEMENTAL_1", bus, values, idx) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def create_ui_commands(packer, pcm_speed, hud, car_fingerprint, is_metric, idx, openpilot_longitudinal_control, stock_hud): | 
					 | 
					 | 
					 | 
					def create_ui_commands(packer, CP, pcm_speed, hud, is_metric, idx, stock_hud): | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  commands = [] | 
					 | 
					 | 
					 | 
					  commands = [] | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  bus_pt = get_pt_bus(car_fingerprint) | 
					 | 
					 | 
					 | 
					  bus_pt = get_pt_bus(CP.carFingerprint) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  radar_disabled = car_fingerprint in HONDA_BOSCH and openpilot_longitudinal_control | 
					 | 
					 | 
					 | 
					  radar_disabled = CP.carFingerprint in HONDA_BOSCH and CP.openpilotLongitudinalControl | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  bus_lkas = get_lkas_cmd_bus(car_fingerprint, radar_disabled) | 
					 | 
					 | 
					 | 
					  bus_lkas = get_lkas_cmd_bus(CP.carFingerprint, radar_disabled) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  if openpilot_longitudinal_control: | 
					 | 
					 | 
					 | 
					  if CP.openpilotLongitudinalControl: | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if car_fingerprint in HONDA_BOSCH: | 
					 | 
					 | 
					 | 
					    if CP.carFingerprint in HONDA_BOSCH: | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      acc_hud_values = { | 
					 | 
					 | 
					 | 
					      acc_hud_values = { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        'CRUISE_SPEED': hud.v_cruise, | 
					 | 
					 | 
					 | 
					        'CRUISE_SPEED': hud.v_cruise, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        'ENABLE_MINI_CAR': 1, | 
					 | 
					 | 
					 | 
					        'ENABLE_MINI_CAR': 1, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -142,16 +142,24 @@ def create_ui_commands(packer, pcm_speed, hud, car_fingerprint, is_metric, idx, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    'SOLID_LANES': hud.lanes, | 
					 | 
					 | 
					 | 
					    'SOLID_LANES': hud.lanes, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    'BEEP': 0, | 
					 | 
					 | 
					 | 
					    'BEEP': 0, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  commands.append(packer.make_can_msg('LKAS_HUD', bus_lkas, lkas_hud_values, idx)) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  if radar_disabled and car_fingerprint in HONDA_BOSCH: | 
					 | 
					 | 
					 | 
					  if not (CP.flags & HondaFlags.BOSCH_EXT_HUD): | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    lkas_hud_values['SET_ME_X48'] = 0x48 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  if CP.flags & HondaFlags.BOSCH_EXT_HUD and not CP.openpilotLongitudinalControl: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    commands.append(packer.make_can_msg('LKAS_HUD_A', bus_lkas, lkas_hud_values, idx)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    commands.append(packer.make_can_msg('LKAS_HUD_B', bus_lkas, lkas_hud_values, idx)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  else: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    commands.append(packer.make_can_msg('LKAS_HUD', bus_lkas, lkas_hud_values, idx)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  if radar_disabled and CP.carFingerprint in HONDA_BOSCH: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    radar_hud_values = { | 
					 | 
					 | 
					 | 
					    radar_hud_values = { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      'CMBS_OFF': 0x01, | 
					 | 
					 | 
					 | 
					      'CMBS_OFF': 0x01, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      'SET_TO_1': 0x01, | 
					 | 
					 | 
					 | 
					      'SET_TO_1': 0x01, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    commands.append(packer.make_can_msg('RADAR_HUD', bus_pt, radar_hud_values, idx)) | 
					 | 
					 | 
					 | 
					    commands.append(packer.make_can_msg('RADAR_HUD', bus_pt, radar_hud_values, idx)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if car_fingerprint == CAR.CIVIC_BOSCH: | 
					 | 
					 | 
					 | 
					    if CP.carFingerprint == CAR.CIVIC_BOSCH: | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      commands.append(packer.make_can_msg("LEGACY_BRAKE_COMMAND", bus_pt, {}, idx)) | 
					 | 
					 | 
					 | 
					      commands.append(packer.make_can_msg("LEGACY_BRAKE_COMMAND", bus_pt, {}, idx)) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  return commands | 
					 | 
					 | 
					 | 
					  return commands | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |