From 684bf3aab21b4bb6e1fcc8f52ab8e4d76c3f2c9b Mon Sep 17 00:00:00 2001 From: Jason Young Date: Tue, 1 Oct 2024 20:43:28 -0400 Subject: [PATCH] mutation test hates lta_angle surviving various changes --- board/safety/safety_toyota.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/board/safety/safety_toyota.h b/board/safety/safety_toyota.h index cf759ff36d..2b6f7667ee 100644 --- a/board/safety/safety_toyota.h +++ b/board/safety/safety_toyota.h @@ -226,10 +226,10 @@ static bool toyota_tx_hook(const CANPacket_t *to_send) { if (toyota_secoc_car && (addr == 0x131)) { bool lta_request = GET_BIT(to_send, 3U); bool lta_request2 = GET_BIT(to_send, 0U); - int lta_angle = (GET_BYTE(to_send, 2) << 8) | GET_BYTE(to_send, 3); - lta_angle = to_signed(lta_angle, 16); + int lta_angle_msb = GET_BYTE(to_send, 2); + int lta_angle_lsb = GET_BYTE(to_send, 3); - bool actuation = lta_request || lta_request2 || (lta_angle != 0); + bool actuation = lta_request || lta_request2 || (lta_angle_msb != 0) || (lta_angle_lsb != 0); if (actuation) { tx = false; }