From 00caf953fa388c8b47fdea1cfac257a1e514d375 Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Tue, 20 Aug 2019 16:21:17 +1000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3DragonSteeringMonitorTimer=20?= =?UTF-8?q?=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- selfdrive/controls/lib/driver_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/controls/lib/driver_monitor.py b/selfdrive/controls/lib/driver_monitor.py index c489655d4..635714101 100644 --- a/selfdrive/controls/lib/driver_monitor.py +++ b/selfdrive/controls/lib/driver_monitor.py @@ -4,8 +4,8 @@ from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET from common.filter_simple import FirstOrderFilter from common.params import Params params = Params() - -_AWARENESS_TIME = int(params.get("DragonSteeringMonitorTimer")) +_Timer = int(params.get("DragonSteeringMonitorTimer")) * 60 +_AWARENESS_TIME = _Timer if _Timer > 0 else 86400 _AWARENESS_PRE_TIME_TILL_TERMINAL = 20. # a first alert is issued 20s before expiration _AWARENESS_PROMPT_TIME_TILL_TERMINAL = 5. # a second alert is issued 5s before start decelerating the car _DISTRACTED_TIME = 10.