wip
This commit is contained in:
@@ -251,9 +251,11 @@ static bool hyundai_canfd_tx_hook(const CANPacket_t *to_send) {
|
||||
bool is_resume = (button == HYUNDAI_BTN_RESUME);
|
||||
bool is_set_decel = (button == 2);
|
||||
|
||||
bool allowed = (is_cancel && cruise_engaged_prev)
|
||||
// bool allowed = (is_cancel && cruise_engaged_prev)
|
||||
// Todo: allow is_cancel anytime speed > 0 on cruiseState
|
||||
bool allowed = (is_cancel)
|
||||
|| (is_resume && controls_allowed)
|
||||
|| (is_resume && is_set_decel);
|
||||
|| (is_set_decel && controls_allowed);
|
||||
|
||||
if (!allowed) {
|
||||
tx = false;
|
||||
|
||||
Reference in New Issue
Block a user