mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-10-01 03:43:42 +08:00
rename variable
This commit is contained in:
@@ -191,11 +191,11 @@ class CarController():
|
||||
# if we detect gas pedal pressed, we do not want OP to apply gas or brake
|
||||
# gasPressed code from interface.py
|
||||
if not CS.CP.enableGasInterceptor:
|
||||
gasPressed = CS.pedal_gas > 0
|
||||
gas_pressed = CS.pedal_gas > 0
|
||||
else:
|
||||
gasPressed = CS.user_gas_pressed
|
||||
gas_pressed = CS.user_gas_pressed
|
||||
dragon_apply_brake = apply_brake
|
||||
if self.dragon_allow_gas and gasPressed:
|
||||
if self.dragon_allow_gas and gas_pressed:
|
||||
dragon_apply_brake = 0
|
||||
apply_gas = 0
|
||||
can_sends.append(hondacan.create_brake_command(self.packer, dragon_apply_brake, pump_on,
|
||||
|
||||
@@ -249,11 +249,11 @@ class CarController():
|
||||
# gasPressed code from interface.py
|
||||
if CS.CP.enableGasInterceptor:
|
||||
# use interceptor values to disengage on pedal press
|
||||
gasPressed = CS.pedal_gas > 15
|
||||
gas_pressed = CS.pedal_gas > 15
|
||||
else:
|
||||
gasPressed = CS.pedal_gas > 0
|
||||
gas_pressed = CS.pedal_gas > 0
|
||||
|
||||
if self.dragon_allow_gas and gasPressed:
|
||||
if self.dragon_allow_gas and gas_pressed:
|
||||
apply_accel = 0
|
||||
apply_gas = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user