Skip to content

Commit

Permalink
disable non-universal checks in hyundai safety
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed May 31, 2020
1 parent 3a85f4c commit 49ffbe9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions board/safety/safety_hyundai.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 49ffbe9

Please sign in to comment.