do not allow stock_dsu mode on reverse/park/neutural gear

This commit is contained in:
Rick Lan
2020-03-25 21:24:07 +10:00
parent cbf3453028
commit a0d132c6e2
+2
View File
@@ -132,6 +132,8 @@ class CarState(CarStateBase):
if self.dragon_toyota_stock_dsu and ret.cruiseState.available:
enable_acc = True
if ret.gearShifter in [car.CarState.GearShifter.reverse, car.CarState.GearShifter.park, car.CarState.GearShifter.neutral]:
enable_acc = False
if ret.seatbeltUnlatched or ret.doorOpen:
enable_acc = False
ret.cruiseState.enabled = enable_acc