Skip to content

Commit

Permalink
Hyundai tests: fix counter in FCA message (commaai#1092)
Browse files Browse the repository at this point in the history
* tests: fix counter in FCA message

* Update tests/safety/test_hyundai.py

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
  • Loading branch information
sshane and adeebshihadeh committed Oct 13, 2022
1 parent de38096 commit c39528d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/safety/test_hyundai.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ def _accel_msg(self, accel, aeb_req=False, aeb_decel=0):

def _fca11_msg(self, idx=0, vsm_aeb_req=False, fca_aeb_req=False, aeb_decel=0):
values = {
"CR_FCA_Alive": ((-((idx % 0xF) + 2) % 4) << 2) + 1,
"Supplemental_Counter": idx % 0xF,
"CR_FCA_Alive": idx % 0xF,
"FCA_Status": 2,
"CR_VSM_DecCmd": aeb_decel,
"CF_VSM_DecCmdAct": int(vsm_aeb_req),
Expand Down

0 comments on commit c39528d

Please sign in to comment.