From 1e0f989d3f3b10d83cd5481d530e65fecf84a8bc Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Wed, 14 Aug 2019 10:31:51 +1000 Subject: [PATCH] =?UTF-8?q?=E5=BB=B6=E9=81=B2=20params=20check=20=E8=87=B3?= =?UTF-8?q?3=E7=A7=92=E4=BB=A5=E6=B8=9B=E5=B0=91=20kernel=20calls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- selfdrive/car/honda/interface.py | 2 +- selfdrive/car/toyota/carstate.py | 2 +- selfdrive/car/toyota/interface.py | 2 +- selfdrive/controls/controlsd.py | 2 +- selfdrive/controls/lib/driver_monitor.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index 042e95fb7..4ec01f2b0 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -369,7 +369,7 @@ class CarInterface(object): def update(self, c, can_strings): # dragonpilot, don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - self.ts_last_check > 1.: + if ts - self.ts_last_check > 3.: self.dragon_enable_steering_on_signal = False if params.get("DragonEnableSteeringOnSignal") == "0" else True self.dragon_allow_gas = False if params.get("DragonAllowGas") == "0" else True self.ts_last_check = ts diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index 171ff611f..bd5deac46 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -119,7 +119,7 @@ class CarState(object): def update(self, cp): # dragonpilot, don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - self.ts_last_check > 1.: + if ts - self.ts_last_check > 3.: self.dragon_toyota_stock_dsu = False if params.get("DragonToyotaStockDSU") == "0" else True self.ts_last_check = ts diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 80e17c598..9aa0a1e77 100755 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -279,7 +279,7 @@ class CarInterface(object): def update(self, c, can_strings): # dragonpilot, don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - self.ts_last_check > 1.: + if ts - self.ts_last_check > 3.: self.dragon_enable_steering_on_signal = False if params.get("DragonEnableSteeringOnSignal") == "0" else True self.dragon_allow_gas = False if params.get("DragonAllowGas") == "0" else True self.dragon_toyota_stock_dsu = False if params.get("DragonToyotaStockDSU") == "0" else True diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 458ed0052..014317c9d 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -509,7 +509,7 @@ def controlsd_thread(gctx=None): while True: # dragonpilot, don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - ts_last_check > 1.: + if ts - ts_last_check > 3.: dragon_toyota_stock_dsu = False if params.get("DragonToyotaStockDSU") == "0" else True ts_last_check = ts diff --git a/selfdrive/controls/lib/driver_monitor.py b/selfdrive/controls/lib/driver_monitor.py index d39678a09..c175adea6 100644 --- a/selfdrive/controls/lib/driver_monitor.py +++ b/selfdrive/controls/lib/driver_monitor.py @@ -152,7 +152,7 @@ class DriverStatus(): # don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - self.ts_last_check > 1.: + if ts - self.ts_last_check > 3.: self.monitor_param_on = params.get("IsDriverMonitoringEnabled") == "1" self.ts_last_check = ts @@ -169,7 +169,7 @@ class DriverStatus(): # don't check for param too often as it's a kernel call ts = sec_since_boot() - if ts - self.dp_last_check > 1.: + if ts - self.dp_last_check > 3.: self.dragon_enable_driver_safety_check = False if params.get("DragonEnableDriverSafetyCheck") == "0" else True self.dp_last_check = ts