Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
87e7683
update pilot
vanillagorillaa Apr 21, 2025
d1c4ac0
test
vanillagorillaa Apr 21, 2025
5c55ab3
Revert "test"
vanillagorillaa Apr 21, 2025
85d0cad
add canfd
vanillagorillaa Apr 22, 2025
f150d47
2025 Pilot
vanillagorillaa Apr 26, 2025
1333748
test
vanillagorillaa Apr 26, 2025
1706fc3
test
vanillagorillaa Apr 26, 2025
dedd5ca
fix
vanillagorillaa Apr 26, 2025
d97cef2
fix
vanillagorillaa Apr 26, 2025
f20a511
add
vanillagorillaa Apr 26, 2025
288778a
add
vanillagorillaa Apr 26, 2025
7dca29c
Revert "test"
vanillagorillaa Apr 26, 2025
038fa68
update LKAS_HUD
vanillagorillaa Apr 26, 2025
14416ea
Revert "Revert "test""
vanillagorillaa Apr 26, 2025
0a4b1bc
fix
vanillagorillaa Apr 26, 2025
2701cb8
add tests
vanillagorillaa Apr 27, 2025
d5e67bd
fix
vanillagorillaa Apr 27, 2025
132d077
fix
vanillagorillaa Apr 27, 2025
fb0aab4
add this too?
vanillagorillaa Apr 27, 2025
5130f35
reorder
vanillagorillaa Apr 27, 2025
d32cc77
update tests
vanillagorillaa Apr 27, 2025
4f1cb1f
add
vanillagorillaa Apr 27, 2025
2cbbe30
add
vanillagorillaa Apr 27, 2025
f31f64c
add
vanillagorillaa Apr 27, 2025
5541005
CANFD Long
vanillagorillaa Apr 27, 2025
5fb1c87
updated name
vanillagorillaa Apr 27, 2025
c940264
missed this one
vanillagorillaa Apr 27, 2025
8f28770
should work
vanillagorillaa Apr 28, 2025
334ee9c
proper
vanillagorillaa Apr 28, 2025
11ebf71
remove these
vanillagorillaa Apr 28, 2025
d70ba30
Merge remote-tracking branch 'origin/merge-master' into canfd_long_co…
mvl-boston Jul 26, 2025
03ba671
add canfd long control safety, separate canfd non-long
mvl-boston Jul 26, 2025
0b32397
Volkswagen and Honda CANFD messages overlap
mvl-boston Jul 26, 2025
b61c73f
Honda CANFD safety tests
mvl-boston Jul 26, 2025
a9bfcb0
Add CANFD cruise faults
mvl-boston Jul 26, 2025
42e9b98
Merge branch 'master' of ssh://github.com/commaai/opendbc into canfd-…
jyoung8607 Aug 7, 2025
454b90c
this was a no-op, CANFD is a subset of Bosch
jyoung8607 Aug 7, 2025
768c7b1
0x1DF isn't coming from the camera
jyoung8607 Aug 7, 2025
d29e9a0
GC apparently obsolete comment
jyoung8607 Aug 7, 2025
fdae6e6
CanBus class handles this, plus Red Panda
jyoung8607 Aug 7, 2025
d885721
Revert "0x1DF isn't coming from the camera"
jyoung8607 Aug 7, 2025
a96905d
0x1DF isn't coming from the camera
jyoung8607 Aug 7, 2025
fa0de53
disable relay check for 0x1DF
jyoung8607 Aug 7, 2025
dccc95c
Merge branch 'master' of ssh://github.com/commaai/opendbc into canfd-…
jyoung8607 Aug 7, 2025
b1bbc10
Merge branch 'master' of ssh://github.com/commaai/opendbc into canfd-…
jyoung8607 Aug 13, 2025
78fab3e
Merge branch 'master' into canfd-long
mvl-boston Sep 11, 2025
5779a3d
typo fix
mvl-boston Sep 11, 2025
c67e999
Merge branch 'master' into canfd-long
mvl-boston Oct 14, 2025
c8ff9c3
Merge branch 'master' into canfd-long
mvl-boston Jan 9, 2026
929bf9b
canfdlong radarhud into tests
mvl-boston Jan 9, 2026
4487e58
allow radar hud through
mvl-boston Jan 9, 2026
fc1b362
match other Bosch comments
mvl-boston Jan 9, 2026
f50d54f
capitalizing CAN-FD consistent with existing comment
mvl-boston Jan 10, 2026
f66e366
capitalizing CAN-FD consistent with existing comment
mvl-boston Jan 10, 2026
d2497ad
hyphenating CAN-FD consistent with existing comment
mvl-boston Jan 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion opendbc/car/honda/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def update(self, CC, CS, now_nanos):
# tester present - w/ no response (keeps radar disabled)
if self.CP.carFingerprint in (HONDA_BOSCH - HONDA_BOSCH_RADARLESS) and self.CP.openpilotLongitudinalControl:
if self.frame % 10 == 0:
can_sends.append(make_tester_present_msg(0x18DAB0F1, 1, suppress_response=True))
can_sends.append(make_tester_present_msg(0x18DAB0F1, self.CAN.pt, suppress_response=True))

# Send steering command.
can_sends.append(hondacan.create_steering_control(self.packer, self.CAN, apply_torque, CC.latActive, self.tja_control))
Expand Down
5 changes: 4 additions & 1 deletion opendbc/car/honda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ def update(self, can_parsers) -> structs.CarState:
ret.accFaulted = bool(cp.vl["CRUISE_FAULT_STATUS"]["CRUISE_FAULT"])
else:
if self.CP.openpilotLongitudinalControl:
ret.accFaulted = bool(cp.vl[self.brake_error_msg]["BRAKE_ERROR_1"] or cp.vl[self.brake_error_msg]["BRAKE_ERROR_2"])
if (self.CP.carFingerprint in HONDA_BOSCH_CANFD) and (self.CP.flags & HondaFlags.BOSCH_ALT_BRAKE):
ret.accFaulted = bool(cp.vl["BRAKE_MODULE"]["CRUISE_FAULT"])
else:
ret.accFaulted = bool(cp.vl[self.brake_error_msg]["BRAKE_ERROR_1"] or cp.vl[self.brake_error_msg]["BRAKE_ERROR_2"])

# Log non-critical stock ACC/LKAS faults if Nidec (camera)
if self.CP.carFingerprint not in HONDA_BOSCH:
Expand Down
4 changes: 2 additions & 2 deletions opendbc/car/honda/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_lo
# WARNING: THIS DISABLES AEB!
# If Bosch radarless, this blocks ACC messages from the camera
# TODO: get radar disable working on Bosch CANFD
ret.alphaLongitudinalAvailable = candidate not in HONDA_BOSCH_CANFD
ret.openpilotLongitudinalControl = alpha_long and (candidate not in HONDA_BOSCH_CANFD)
ret.alphaLongitudinalAvailable = True
ret.openpilotLongitudinalControl = alpha_long
ret.pcmCruise = not ret.openpilotLongitudinalControl
else:
ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.hondaNidec)]
Expand Down
13 changes: 10 additions & 3 deletions opendbc/safety/modes/honda.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,17 @@ static safety_config honda_bosch_init(uint16_t param) {
static CanMsg HONDA_RADARLESS_LONG_TX_MSGS[] = {{0xE4, 0, 5, .check_relay = true}, {0x33D, 0, 8, .check_relay = true}, {0x1C8, 0, 8, .check_relay = true},
{0x30C, 0, 8, .check_relay = true}}; // Bosch radarless w/ gas and brakes

static CanMsg HONDA_CANFD_TX_MSGS[] = {{0xE4, 0, 5, .check_relay = true}, {0x296, 0, 4, .check_relay = false}, {0x33D, 0, 8, .check_relay = true}};
static CanMsg HONDA_CANFD_TX_MSGS[] = {{0xE4, 0, 5, .check_relay = true}, {0x296, 0, 4, .check_relay = false}, {0x33D, 0, 8, .check_relay = true}}; // Bosch CAN-FD

static CanMsg HONDA_CANFD_LONG_TX_MSGS[] = {{0xE4, 0, 5, .check_relay = true}, {0x1DF, 0, 8, .check_relay = false}, {0x1EF, 0, 8, .check_relay = false},
{0x30C, 0, 8, .check_relay = false}, {0x33D, 0, 8, .check_relay = true}, {0x39F, 0, 8, .check_relay = false},
{0x18DAB0F1, 0, 8, .check_relay = false}}; // Bosch CAN-FD w/ gas and brakes

const uint16_t HONDA_PARAM_ALT_BRAKE = 1;
const uint16_t HONDA_PARAM_RADARLESS = 8;
const uint16_t HONDA_PARAM_BOSCH_CANFD = 16;

// Bosch radarless has the powertrain bus on bus 0
// Bosch radarless and CAN-FD have the powertrain bus on bus 0
static RxCheck honda_bosch_pt0_rx_checks[] = {
HONDA_COMMON_RX_CHECKS(0)
};
Expand Down Expand Up @@ -393,7 +396,11 @@ static safety_config honda_bosch_init(uint16_t param) {
SET_TX_MSGS(HONDA_RADARLESS_TX_MSGS, ret);
}
} else if (honda_bosch_canfd) {
SET_TX_MSGS(HONDA_CANFD_TX_MSGS, ret);
if (honda_bosch_long) {
SET_TX_MSGS(HONDA_CANFD_LONG_TX_MSGS, ret);
} else {
SET_TX_MSGS(HONDA_CANFD_TX_MSGS, ret);
}
} else {
if (honda_bosch_long) {
SET_TX_MSGS(HONDA_BOSCH_LONG_TX_MSGS, ret);
Expand Down
4 changes: 4 additions & 0 deletions opendbc/safety/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,10 @@ def test_tx_hook_on_wrong_safety_mode(self):
if attr == 'TestVolkswagenMqbLongSafety' and current_test.startswith('TestHondaBoschRadarless'):
tx = list(filter(lambda m: m[0] not in [0x30c, ], tx))

# Volkswagen MQB and Honda Bosch CAN-FD ACC HUD messages overlap
if attr == 'TestVolkswagenMqbLongSafety' and current_test.startswith('TestHondaBoschCANFD'):
tx = list(filter(lambda m: m[0] not in [0x30c, ], tx))

# TODO: Temporary, should be fixed in panda firmware, safety_honda.h
if attr.startswith('TestHonda'):
# exceptions for common msgs across different hondas
Expand Down
27 changes: 24 additions & 3 deletions opendbc/safety/tests/test_honda.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class Btn:
# * Bosch with Longitudinal Support
# * Bosch Radarless
# * Bosch Radarless with Longitudinal Support
# * Bosch CAN-FD
# * Bosch CAN-FD with Longitudinal Support


class HondaButtonEnableBase(common.CarSafetyTest):
Expand Down Expand Up @@ -562,7 +564,7 @@ def test_spam_cancel_safety_check(self):


class TestHondaBoschCANFDSafetyBase(TestHondaBoschSafetyBase):
"""Base class for CANFD Honda Bosch"""
"""Base class for CAN-FD Honda Bosch"""
PT_BUS = 0
STEER_BUS = 0
BUTTONS_BUS = 0
Expand All @@ -578,7 +580,7 @@ def setUp(self):

class TestHondaBoschCANFDSafety(HondaPcmEnableBase, TestHondaBoschCANFDSafetyBase):
"""
Covers the Honda Bosch CANFD safety mode with stock longitudinal
Covers the Honda Bosch CAN-FD safety mode with stock longitudinal
"""

def setUp(self):
Expand All @@ -589,7 +591,7 @@ def setUp(self):

class TestHondaBoschCANFDAltBrakeSafety(HondaPcmEnableBase, TestHondaBoschCANFDSafetyBase, TestHondaBoschAltBrakeSafetyBase):
"""
Covers the Honda Bosch CANFD safety mode with stock longitudinal and an alternate brake message
Covers the Honda Bosch CAN-FD safety mode with stock longitudinal and an alternate brake message
"""

def setUp(self):
Expand All @@ -598,5 +600,24 @@ def setUp(self):
self.safety.init_tests()


class TestHondaBoschCANFDLongSafety(TestHondaBoschLongSafety, TestHondaBoschCANFDSafetyBase):
"""
Covers the Honda Bosch CAN-FD safety mode with longitudinal control
"""

PT_BUS = 0
STEER_BUS = 0
BUTTONS_BUS = 0

TX_MSGS = [[0xE4, 0], [0x1DF, 0], [0x1EF, 0], [0x30C, 0], [0x33D, 0], [0x39F, 0], [0x18DAB0F1, 0]]
FWD_BLACKLISTED_ADDRS = {2: [0xE4, 0x33D]}
RELAY_MALFUNCTION_ADDRS = {0: (0xE4, 0x33D)} # STEERING_CONTROL / LKAS_HUD

def setUp(self):
super().setUp()
self.safety.set_safety_hooks(CarParams.SafetyModel.hondaBosch, HondaSafetyFlags.BOSCH_CANFD | HondaSafetyFlags.BOSCH_LONG)
self.safety.init_tests()


if __name__ == "__main__":
unittest.main()