From 9aabc7e6058bf1567fe819794678a51da3a3fce4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 21 May 2024 00:20:54 -0500 Subject: [PATCH] wip --- panda/board/safety/safety_hyundai_canfd.h | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/panda/board/safety/safety_hyundai_canfd.h b/panda/board/safety/safety_hyundai_canfd.h index edcce2f..1a1acdc 100755 --- a/panda/board/safety/safety_hyundai_canfd.h +++ b/panda/board/safety/safety_hyundai_canfd.h @@ -403,26 +403,26 @@ BO_ 1151 HVAC_TOUCH_BUTTONS: 8 XXX } // ACCEL: safety check - if (addr == 0x1a0) { - int desired_accel_raw = (((GET_BYTE(to_send, 17) & 0x7U) << 8) | GET_BYTE(to_send, 16)) - 1023U; - int desired_accel_val = ((GET_BYTE(to_send, 18) << 4) | (GET_BYTE(to_send, 17) >> 4)) - 1023U; + // if (addr == 0x1a0) { + // int desired_accel_raw = (((GET_BYTE(to_send, 17) & 0x7U) << 8) | GET_BYTE(to_send, 16)) - 1023U; + // int desired_accel_val = ((GET_BYTE(to_send, 18) << 4) | (GET_BYTE(to_send, 17) >> 4)) - 1023U; - bool violation = false; + // bool violation = false; - if (hyundai_longitudinal) { - violation |= longitudinal_accel_checks(desired_accel_raw, HYUNDAI_LONG_LIMITS); - violation |= longitudinal_accel_checks(desired_accel_val, HYUNDAI_LONG_LIMITS); - } else { - // only used to cancel on here - if ((desired_accel_raw != 0) || (desired_accel_val != 0)) { - violation = true; - } - } + // if (hyundai_longitudinal) { + // violation |= longitudinal_accel_checks(desired_accel_raw, HYUNDAI_LONG_LIMITS); + // violation |= longitudinal_accel_checks(desired_accel_val, HYUNDAI_LONG_LIMITS); + // } else { + // // only used to cancel on here + // if ((desired_accel_raw != 0) || (desired_accel_val != 0)) { + // violation = true; + // } + // } - if (violation) { - tx = false; - } - } + // if (violation) { + // tx = false; + // } + // } return tx; }