diff --git a/board/safety/safety_hyundai.h b/board/safety/safety_hyundai.h index 4165a72..278b725 100644 --- a/board/safety/safety_hyundai.h +++ b/board/safety/safety_hyundai.h @@ -19,10 +19,14 @@ const CanMsg HYUNDAI_TX_MSGS[] = { // TODO: missing checksum for wheel speeds message,worst failure case is // wheel speeds stuck at 0 and we don't disengage on brake press +// TODO: refactor addr check to cleanly re-enable commented out checks for cars that have them AddrCheckStruct hyundai_rx_checks[] = { {.msg = {{608, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 10000U}}}, - {.msg = {{902, 0, 8, .max_counter = 15U, .expected_timestep = 10000U}}}, - {.msg = {{916, 0, 8, .check_checksum = true, .max_counter = 7U, .expected_timestep = 10000U}}}, + // TODO: older hyundai models don't populate the counter bits in 902 + //{.msg = {{902, 0, 8, .max_counter = 15U, .expected_timestep = 10000U}}}, + {.msg = {{902, 0, 8, .max_counter = 0U, .expected_timestep = 10000U}}}, + //{.msg = {{916, 0, 8, .check_checksum = true, .max_counter = 7U, .expected_timestep = 10000U}}}, + {.msg = {{916, 0, 8, .check_checksum = false, .max_counter = 0U, .expected_timestep = 10000U}}}, {.msg = {{1057, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 20000U}}}, }; const int HYUNDAI_RX_CHECK_LEN = sizeof(hyundai_rx_checks) / sizeof(hyundai_rx_checks[0]);