wip
This commit is contained in:
@@ -283,16 +283,16 @@ static bool hyundai_tx_hook(const CANPacket_t *to_send) {
|
||||
if ((addr == 0x4F1) && !hyundai_longitudinal) {
|
||||
int button = GET_BYTE(to_send, 0) & 0x7U;
|
||||
|
||||
// bool allowed_resume = (button == 1) && controls_allowed;
|
||||
// bool allowed_cancel = (button == 4) && cruise_engaged_prev;
|
||||
// if (!(allowed_resume || allowed_cancel)) {
|
||||
// tx = false;
|
||||
// }
|
||||
|
||||
// CLEARPILOT - Allow buttons 1 (accel), 2 (decel), 4 (pause/resume)
|
||||
if (!(button == 1 || button == 2 || button == 3)) {
|
||||
bool allowed_resume = (button == 1) && controls_allowed;
|
||||
bool allowed_cancel = (button == 4) && cruise_engaged_prev;
|
||||
if (!(allowed_resume || allowed_cancel)) {
|
||||
tx = false;
|
||||
}
|
||||
|
||||
// CLEARPILOT - Allow buttons 1 (accel), 2 (decel), 4 (pause/resume)
|
||||
// if (!(button == 1 || button == 2 || button == 3)) {
|
||||
// tx = false;
|
||||
// }
|
||||
}
|
||||
|
||||
return tx;
|
||||
|
||||
Reference in New Issue
Block a user