Improve honda dp_allow_gas logic

This commit is contained in:
dragonpilot
2019-10-11 09:57:07 +10:00
parent adf8e823b9
commit a7602eae5e
+3 -2
View File
@@ -194,10 +194,11 @@ class CarController():
gasPressed = CS.pedal_gas > 0
else:
gasPressed = CS.user_gas_pressed
dragon_apply_brake = apply_brake
if self.dragon_allow_gas and gasPressed:
apply_brake = 0
dragon_apply_brake = 0
apply_gas = 0
can_sends.append(hondacan.create_brake_command(self.packer, apply_brake, pump_on,
can_sends.append(hondacan.create_brake_command(self.packer, dragon_apply_brake, pump_on,
pcm_override, pcm_cancel_cmd, hud.fcw, idx, CS.CP.carFingerprint, CS.CP.isPandaBlack))
self.apply_brake_last = apply_brake