From a01513d97017ba10af8a05bfafc96c9c6ea61957 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 8 Nov 2022 13:37:02 -0800 Subject: [PATCH] safety replay: fix hyundai segments (#1140) * fix hyundai safety replay * clean up --- tests/safety_replay/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/safety_replay/helpers.py b/tests/safety_replay/helpers.py index 61067379df..d6987b6c02 100644 --- a/tests/safety_replay/helpers.py +++ b/tests/safety_replay/helpers.py @@ -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: