Skip to content

Commit

Permalink
safety replay: fix hyundai segments (#1140)
Browse files Browse the repository at this point in the history
* fix hyundai safety replay

* clean up
  • Loading branch information
sshane authored Nov 8, 2022
1 parent 1ccdff9 commit a01513d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/safety_replay/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_steer_torque(mode, to_send):
ret = ((to_send.RDLR & 0x7) << 8) + ((to_send.RDLR & 0xFF00) >> 8)
ret = to_signed(ret, 11)
elif mode == Panda.SAFETY_HYUNDAI:
ret = ((to_send.RDLR >> 16) & 0x7ff) - 1024
ret = (((to_send.data[3] & 0x7) << 8) | to_send.data[2]) - 1024
elif mode == Panda.SAFETY_CHRYSLER:
ret = ((to_send.RDLR & 0x7) << 8) + ((to_send.RDLR & 0xFF00) >> 8) - 1024
elif mode == Panda.SAFETY_SUBARU:
Expand Down

0 comments on commit a01513d

Please sign in to comment.