Skip to content

Commit

Permalink
Detect cruise on cam bus
Browse files Browse the repository at this point in the history
  • Loading branch information
bravochar committed Nov 23, 2024
1 parent e0e61cc commit 61c7076
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion board/safety/safety_subaru.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static void subaru_rx_hook(const CANPacket_t *to_push) {
pcm_cruise_check(cruise_engaged);

// LKAS Angle cars use different message
} else if (subaru_lkas_angle && (addr == MSG_SUBARU_ES_DashStatus) && (bus == alt_main_bus)) {
} else if (subaru_lkas_angle && (addr == MSG_SUBARU_ES_DashStatus) && (bus == SUBARU_CAM_BUS)) {
bool cruise_engaged = GET_BIT(to_push, 36U);
pcm_cruise_check(cruise_engaged);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/safety/test_subaru.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def _angle_meas_msg(self, angle):
# need to use ES_DashStatus Message
def _pcm_status_msg(self, enable):
values = {"Cruise_Activated": enable}
return self.packer.make_can_msg_panda("ES_DashStatus", self.ALT_MAIN_BUS, values)
return self.packer.make_can_msg_panda("ES_DashStatus", self.ALT_CAM_BUS, values)


class TestSubaruGen1TorqueStockLongitudinalSafety(TestSubaruStockLongitudinalSafetyBase, TestSubaruTorqueSafetyBase):
Expand Down

0 comments on commit 61c7076

Please sign in to comment.