Skip to content

Commit

Permalink
forward buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
gregjhogan committed Jan 19, 2024
1 parent b95b958 commit 7994f48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions board/safety/safety_chrysler.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,7 @@ static int chrysler_fwd_hook(int bus_num, int addr) {
int bus_fwd = -1;

// forward to camera
const bool is_buttons = (addr == chrysler_addrs->CRUISE_BUTTONS);
if ((bus_num == 0) && !(chrysler_longitudinal && is_buttons)) {
if (bus_num == 0) {
bus_fwd = 2;
}

Expand Down
6 changes: 3 additions & 3 deletions tests/safety/test_chrysler.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_buttons(self):

class TestChryslerLongitudinalSafety(ChryslerLongitudinalBase, TestChryslerSafety):
TX_MSGS = [[0x23B, 0], [0x292, 0], [0x2A6, 0], [0x1F4, 0], [0x1F5, 0], [0x271, 0]]
FWD_BLACKLISTED_ADDRS = {0: [0x23B], 2: [0x292, 0x2A6, 0x1F4, 0x1F5, 0x271]}
FWD_BLACKLISTED_ADDRS = {2: [0x292, 0x2A6, 0x1F4, 0x1F5, 0x271]}

def setUp(self):
self.packer = CANPackerPanda("chrysler_pacifica_2017_hybrid_generated")
Expand All @@ -216,7 +216,7 @@ def setUp(self):

class TestChryslerRamDTLongitudinalSafety(ChryslerLongitudinalBase, TestChryslerRamDTSafety):
TX_MSGS = [[0xB1, 0], [0xA6, 0], [0xFA, 0], [0x99, 0], [0xE8, 0], [0xA3, 0]]
FWD_BLACKLISTED_ADDRS = {0: [0xB1], 2: [0xA6, 0xFA, 0x99, 0xE8, 0xA3]}
FWD_BLACKLISTED_ADDRS = {2: [0xA6, 0xFA, 0x99, 0xE8, 0xA3]}

def setUp(self):
self.packer = CANPackerPanda("chrysler_ram_dt_generated")
Expand All @@ -227,7 +227,7 @@ def setUp(self):

class TestChryslerRamHDLongitudinalSafety(ChryslerLongitudinalBase, TestChryslerRamHDSafety):
TX_MSGS = [[0x23A, 0], [0x275, 0], [0x276, 0], [0x1F4, 0], [0x1F5, 0], [0x271, 0]]
FWD_BLACKLISTED_ADDRS = {0: [0x23A], 2: [0x275, 0x276, 0x1F4, 0x1F5, 0x271]}
FWD_BLACKLISTED_ADDRS = {2: [0x275, 0x276, 0x1F4, 0x1F5, 0x271]}

def setUp(self):
self.packer = CANPackerPanda("chrysler_ram_hd_generated")
Expand Down

0 comments on commit 7994f48

Please sign in to comment.