diff --git a/panda/VERSION b/panda/VERSION index 538a65cc825174..b7c8e167db982f 100644 --- a/panda/VERSION +++ b/panda/VERSION @@ -1 +1 @@ -v1.6.9 \ No newline at end of file +v1.7.0 \ No newline at end of file diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed index d7e011d8fb7ecc..8526a5b993edb2 100644 Binary files a/panda/board/obj/panda.bin.signed and b/panda/board/obj/panda.bin.signed differ diff --git a/panda/board/safety/safety_honda.h b/panda/board/safety/safety_honda.h index 4cef17f79d0ed5..ab8ceb52905206 100644 --- a/panda/board/safety/safety_honda.h +++ b/panda/board/safety/safety_honda.h @@ -6,7 +6,7 @@ // accel rising edge // brake rising edge // brake > 0mph -const AddrBus HONDA_N_TX_MSGS[] = {{0xE4, 0}, {0x194, 0}, {0x1FA, 0}, {0x200, 0}, {0x30C, 0}, {0x33D, 0}, {0x39F, 0}}; +const AddrBus HONDA_N_TX_MSGS[] = {{0xE4, 0}, {0x194, 0}, {0x1FA, 0}, {0x200, 0}, {0x30C, 0}, {0x33D, 0}}; const AddrBus HONDA_BH_TX_MSGS[] = {{0xE4, 0}, {0x296, 1}, {0x33D, 0}}; // Bosch Harness const AddrBus HONDA_BG_TX_MSGS[] = {{0xE4, 2}, {0x296, 0}, {0x33D, 2}}; // Bosch Giraffe const int HONDA_GAS_INTERCEPTOR_THRESHOLD = 328; // ratio between offset and gain from dbc file @@ -216,7 +216,6 @@ static int honda_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) { // fwd from car to camera. also fwd certain msgs from camera to car // 0xE4 is steering on all cars except CRV and RDX, 0x194 for CRV and RDX, // 0x1FA is brake control, 0x30C is acc hud, 0x33D is lkas hud, - // 0x39f is radar hud int bus_fwd = -1; if (!relay_malfunction) { @@ -227,7 +226,7 @@ static int honda_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd) { // block stock lkas messages and stock acc messages (if OP is doing ACC) int addr = GET_ADDR(to_fwd); bool is_lkas_msg = (addr == 0xE4) || (addr == 0x194) || (addr == 0x33D); - bool is_acc_hud_msg = (addr == 0x30C) || (addr == 0x39F); + bool is_acc_hud_msg = addr == 0x30C; bool is_brake_msg = addr == 0x1FA; bool block_fwd = is_lkas_msg || (is_acc_hud_msg && long_controls_allowed) || diff --git a/panda/tests/safety/test_honda.py b/panda/tests/safety/test_honda.py index 6ab247835af7e4..f89e7a593f4e85 100755 --- a/panda/tests/safety/test_honda.py +++ b/panda/tests/safety/test_honda.py @@ -8,7 +8,7 @@ MAX_BRAKE = 255 INTERCEPTOR_THRESHOLD = 328 -TX_MSGS = [[0xE4, 0], [0x194, 0], [0x1FA, 0], [0x200, 0], [0x30C, 0], [0x33D, 0], [0x39F, 0]] +TX_MSGS = [[0xE4, 0], [0x194, 0], [0x1FA, 0], [0x200, 0], [0x30C, 0], [0x33D, 0]] class TestHondaSafety(unittest.TestCase): @classmethod @@ -253,7 +253,7 @@ def test_fwd_hook(self): self.safety.set_long_controls_allowed(l) blocked_msgs = [0xE4, 0x194, 0x33D] if l: - blocked_msgs += [0x30C, 0x39F] + blocked_msgs += [0x30C] if not f: blocked_msgs += [0x1FA] for b in buss: diff --git a/panda/tests/safety_replay/test_safety_replay.py b/panda/tests/safety_replay/test_safety_replay.py index b4278351fee0b3..4b2f5372df07c5 100755 --- a/panda/tests/safety_replay/test_safety_replay.py +++ b/panda/tests/safety_replay/test_safety_replay.py @@ -11,7 +11,7 @@ # (route, safety mode, param) logs = [ - ("b0c9d2329ad1606b|2019-05-30--20-23-57.bz2", Panda.SAFETY_HONDA, 0), # HONDA.CIVIC + ("2425568437959f9d|2019-12-22--16-24-37.bz2", Panda.SAFETY_HONDA_NIDEC, 0), # HONDA.CIVIC (fcw presents: 0x1FA blocked as expected) ("38bfd238edecbcd7|2019-06-07--10-15-25.bz2", Panda.SAFETY_TOYOTA, 66), # TOYOTA.PRIUS ("f89c604cf653e2bf|2018-09-29--13-46-50.bz2", Panda.SAFETY_GM, 0), # GM.VOLT ("0375fdf7b1ce594d|2019-05-21--20-10-33.bz2", Panda.SAFETY_HONDA_BOSCH, 1), # HONDA.ACCORD diff --git a/selfdrive/car/honda/hondacan.py b/selfdrive/car/honda/hondacan.py index 855a0e7dce8ca9..411d0c881fdbea 100644 --- a/selfdrive/car/honda/hondacan.py +++ b/selfdrive/car/honda/hondacan.py @@ -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 diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index f6a27902bd5f20..ad39b19b879757 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -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]: diff --git a/selfdrive/controls/lib/alerts.py b/selfdrive/controls/lib/alerts.py index a7d85058aba4cc..e9295bfef7a110 100644 --- a/selfdrive/controls/lib/alerts.py +++ b/selfdrive/controls/lib/alerts.py @@ -80,6 +80,13 @@ def __gt__(self, alert2): 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", diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index f603a2498603c3..0c0be19b61858f 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -b2364d6239bca0a8caaf11f0433bf766c66e15a4 \ No newline at end of file +89304bdcab73fa43a8dd39cab93bc4ea4c9cbbdb \ No newline at end of file