Merge branch 'devel-en' into devel-zhs

This commit is contained in:
dragonpilot
2019-10-30 10:37:42 +10:00
+3 -2
View File
@@ -114,8 +114,9 @@ static int honda_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
// disallow actuator commands if gas or brake (with vehicle moving) are pressed
// and the the latching controls_allowed flag is True
int pedal_pressed = honda_gas_prev || (gas_interceptor_prev > HONDA_GAS_INTERCEPTOR_THRESHOLD) ||
(honda_brake_pressed_prev && honda_moving);
//int pedal_pressed = honda_gas_prev || (gas_interceptor_prev > HONDA_GAS_INTERCEPTOR_THRESHOLD) ||
// (honda_brake_pressed_prev && honda_moving);
int pedal_pressed = honda_brake_pressed_prev && honda_moving;
bool current_controls_allowed = controls_allowed && !(pedal_pressed);
// BRAKE: safety check