FrogPilot community - Keep single_pedal_mode when Regen pressed
Co-Authored-By: garrettpall <76917194+garrettpall@users.noreply.github.com>
This commit is contained in:
parent
33e2be0a2f
commit
233e777bc5
@ -92,7 +92,7 @@ class CarState(CarStateBase):
|
|||||||
# Regen braking is braking
|
# Regen braking is braking
|
||||||
if self.CP.transmissionType == TransmissionType.direct:
|
if self.CP.transmissionType == TransmissionType.direct:
|
||||||
ret.regenBraking = pt_cp.vl["EBCMRegenPaddle"]["RegenPaddle"] != 0
|
ret.regenBraking = pt_cp.vl["EBCMRegenPaddle"]["RegenPaddle"] != 0
|
||||||
self.single_pedal_mode = ret.gearShifter == GearShifter.low or pt_cp.vl["EVDriveMode"]["SinglePedalModeActive"] == 1
|
self.single_pedal_mode = ret.gearShifter == GearShifter.low or pt_cp.vl["EVDriveMode"]["SinglePedalModeActive"] == 1 or (ret.regenBraking and GearShifter.manumatic)
|
||||||
|
|
||||||
if self.CP.enableGasInterceptor:
|
if self.CP.enableGasInterceptor:
|
||||||
ret.gas = (pt_cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS"] + pt_cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS2"]) / 2.
|
ret.gas = (pt_cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS"] + pt_cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS2"]) / 2.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user