From 02644ab02a0be23eede5c9df6bef8db932658194 Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Wed, 31 Jul 2019 22:34:29 +1000 Subject: [PATCH] =?UTF-8?q?dragon=5Ftoyota=5Fstock=5Fdsu=20=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E5=8F=AA=E5=9C=A8=E9=81=A9=E7=95=B6=E7=9A=84?= =?UTF-8?q?=E6=83=85=E6=B3=81=E4=B8=8B=20pcm=5Facc=5Factive=20=E6=89=8D?= =?UTF-8?q?=E8=A8=AD=E6=88=90=20True?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- selfdrive/car/toyota/carstate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index 4c6398f10..171ff611f 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -197,7 +197,10 @@ class CarState(object): self.generic_toggle = bool(cp.vl["LIGHT_STALK"]['AUTO_HIGH_BEAM']) if self.dragon_toyota_stock_dsu and self.generic_toggle and self.main_on: - self.pcm_acc_active = True + enable_acc = True + if not self.gear_shifter == 'drive' or not self.seatbelt or not self.door_all_closed: + enable_acc = False + self.pcm_acc_active = enable_acc if self.standstill: self.pcm_acc_status = 7 else: