Skip to content

Commit

Permalink
Mazda: Fix BSM detection with blinkers (#27919)
Browse files Browse the repository at this point in the history
* Mazda: Fix BSM detection

Submitted-by: Samuel <[email protected]>
Signed-off-by: Jafar Al-Gharaibeh <[email protected]>

* bump opendbc

* use new signals

---------

Signed-off-by: Jafar Al-Gharaibeh <[email protected]>
Co-authored-by: Shane Smiskol <[email protected]>
old-commit-hash: 354b5be
  • Loading branch information
Jafaral and sshane authored Jun 16, 2023
1 parent cb9abba commit 75d8443
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion opendbc
Submodule opendbc updated 1 files
+4 −2 mazda_2017.dbc
8 changes: 4 additions & 4 deletions selfdrive/car/mazda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def update(self, cp, cp_cam):
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(can_gear, None))

ret.genericToggle = bool(cp.vl["BLINK_INFO"]["HIGH_BEAMS"])
ret.leftBlindspot = cp.vl["BSM"]["LEFT_BS1"] == 1
ret.rightBlindspot = cp.vl["BSM"]["RIGHT_BS1"] == 1
ret.leftBlindspot = cp.vl["BSM"]["LEFT_BS_STATUS"] != 0
ret.rightBlindspot = cp.vl["BSM"]["RIGHT_BS_STATUS"] != 0
ret.leftBlinker, ret.rightBlinker = self.update_blinker_from_lamp(40, cp.vl["BLINK_INFO"]["LEFT_BLINK"] == 1,
cp.vl["BLINK_INFO"]["RIGHT_BLINK"] == 1)

Expand Down Expand Up @@ -151,8 +151,8 @@ def get_can_parser(CP):
("PEDAL_GAS", "ENGINE_DATA"),
("SPEED", "ENGINE_DATA"),
("CTR", "CRZ_BTNS"),
("LEFT_BS1", "BSM"),
("RIGHT_BS1", "BSM"),
("LEFT_BS_STATUS", "BSM"),
("RIGHT_BS_STATUS", "BSM"),
]

checks += [
Expand Down

0 comments on commit 75d8443

Please sign in to comment.