mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-30 19:33:42 +08:00
Honda fwd fixes (#5)
- fix chime forwarding - forward radar hud msg from stock - no EON chime during stock fcw
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from selfdrive.config import Conversions as CV
|
||||
from selfdrive.car.honda.values import CAR, HONDA_BOSCH
|
||||
from selfdrive.car.honda.values import HONDA_BOSCH
|
||||
|
||||
|
||||
def get_pt_bus(car_fingerprint, has_relay):
|
||||
@@ -25,7 +25,7 @@ def create_brake_command(packer, apply_brake, pump_on, pcm_override, pcm_cancel_
|
||||
"COMPUTER_BRAKE_REQUEST": brake_rq,
|
||||
"SET_ME_1": 1,
|
||||
"BRAKE_LIGHTS": brakelights,
|
||||
"CHIME": stock_brake["CHIME"], # chime issued when disabling FCM
|
||||
"CHIME": stock_brake["CHIME"] if fcw else 0, # send the chime for stock fcw
|
||||
"FCW": fcw << 1, # TODO: Why are there two bits for fcw?
|
||||
"AEB_REQ_1": 0,
|
||||
"AEB_REQ_2": 0,
|
||||
@@ -76,14 +76,6 @@ def create_ui_commands(packer, pcm_speed, hud, car_fingerprint, is_metric, idx,
|
||||
}
|
||||
commands.append(packer.make_can_msg('LKAS_HUD', bus_lkas, lkas_hud_values, idx))
|
||||
|
||||
if car_fingerprint in (CAR.CIVIC, CAR.ODYSSEY):
|
||||
radar_hud_values = {
|
||||
'ACC_ALERTS': hud.acc_alert,
|
||||
'LEAD_SPEED': 0x1fe, # What are these magic values
|
||||
'LEAD_STATE': 0x7,
|
||||
'LEAD_DISTANCE': 0x1e,
|
||||
}
|
||||
commands.append(packer.make_can_msg('RADAR_HUD', bus_pt, radar_hud_values, idx))
|
||||
return commands
|
||||
|
||||
|
||||
|
||||
@@ -257,10 +257,14 @@ def state_control(frame, rcv_frame, plan, path_plan, CS, CP, state, events, v_cr
|
||||
# add eventual driver distracted events
|
||||
events = driver_status.update(events, driver_engaged, isActive(state), CS.standstill)
|
||||
|
||||
# send FCW alert if triggered by planner
|
||||
if plan.fcw or CS.stockFcw:
|
||||
if plan.fcw:
|
||||
# send FCW alert if triggered by planner
|
||||
AM.add(frame, "fcw", enabled)
|
||||
|
||||
elif CS.stockFcw:
|
||||
# send a silent alert when stock fcw triggers, since the car is already beeping
|
||||
AM.add(frame, "fcwStock", enabled)
|
||||
|
||||
# State specific actions
|
||||
|
||||
if state in [State.preEnabled, State.disabled]:
|
||||
|
||||
@@ -80,6 +80,13 @@ ALERTS = [
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.chimeWarningRepeat, 1., 2., 2.),
|
||||
|
||||
Alert(
|
||||
"fcwStock",
|
||||
"BRAKE!",
|
||||
"Risk of Collision",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 1., 2., 2.), # no EON chime for stock FCW
|
||||
|
||||
Alert(
|
||||
"steerSaturated",
|
||||
"TAKE CONTROL",
|
||||
|
||||
@@ -1 +1 @@
|
||||
b2364d6239bca0a8caaf11f0433bf766c66e15a4
|
||||
89304bdcab73fa43a8dd39cab93bc4ea4c9cbbdb
|
||||
Reference in New Issue
Block a user