-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Honda: fix alt brake address check race condition #1723
Conversation
…g with 0x296 is safe
safety_config ret; | ||
if (honda_bosch_radarless && honda_alt_brake_msg) { | ||
SET_RX_CHECKS(honda_common_alt_brake_rx_checks, ret); | ||
} else if (honda_bosch_radarless) { | ||
SET_RX_CHECKS(honda_common_rx_checks, ret); | ||
} else if (honda_alt_brake_msg) { | ||
SET_RX_CHECKS(honda_bosch_alt_brake_rx_checks, ret); | ||
} else { | ||
SET_RX_CHECKS(honda_bosch_rx_checks, ret); | ||
} | ||
|
||
if (honda_bosch_radarless) { | ||
ret = honda_bosch_long ? BUILD_SAFETY_CFG(honda_common_rx_checks, HONDA_RADARLESS_LONG_TX_MSGS) : \ | ||
BUILD_SAFETY_CFG(honda_common_rx_checks, HONDA_RADARLESS_TX_MSGS); | ||
honda_bosch_long ? SET_TX_MSGS(HONDA_RADARLESS_LONG_TX_MSGS, ret) : \ | ||
SET_TX_MSGS(HONDA_RADARLESS_TX_MSGS, ret); | ||
} else { | ||
ret = honda_bosch_long ? BUILD_SAFETY_CFG(honda_bosch_rx_checks, HONDA_BOSCH_LONG_TX_MSGS) : \ | ||
BUILD_SAFETY_CFG(honda_bosch_rx_checks, HONDA_BOSCH_TX_MSGS); | ||
honda_bosch_long ? SET_TX_MSGS(HONDA_BOSCH_LONG_TX_MSGS, ret) : \ | ||
SET_TX_MSGS(HONDA_BOSCH_TX_MSGS, ret); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adeebshihadeh is setting the rx/tx messages piecemeal okay? If not the if statement block would be pretty large since the refactor. We can use BUILD_SAFETY_CFG
if we store the count again, but needs the old macro and addr struct anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, let's just make it clean
4a0282d
to
5091068
Compare
This reverts commit 42a6293.
Caught by commaai/openpilot#30443. Should just make the rx hook not consider the address if it's not in our set of addresses. Right now it's totally ignoring either the powertrain data msg, or the brake module msg depending on which it sees first.
This PR uses the safety param to add the addr check.
PR to add true whitelisting: #1732