fix logic

This commit is contained in:
Dragonpilot
2019-07-29 14:09:39 +10:00
parent c73cbdd69e
commit 2014a651f5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -372,7 +372,7 @@ class CarInterface(object):
elif not ret.cruiseState.enabled:
events.append(create_event('pcmDisable', [ET.USER_DISABLE]))
if self.dragon_toyota_stock_dsu:
if not self.dragon_toyota_stock_dsu:
# DragonAllowGas
if params.get("DragonAllowGas") == "0":
# disable on pedals rising edge or when brake is pressed and speed isn't zero
+1 -1
View File
@@ -507,7 +507,7 @@ def controlsd_thread(gctx=None):
if not CS.canValid:
events.append(create_event('canError', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE]))
if dragon_toyota_stock_dsu:
if not dragon_toyota_stock_dsu:
# Only allow engagement with brake pressed when stopped behind another stopped car
if CS.brakePressed and sm['plan'].vTargetFuture >= STARTING_TARGET_SPEED and not CP.radarOffCan and CS.vEgo < 0.3:
events.append(create_event('noTarget', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE]))