Reduced wheel touch time (#2259)
* decrease wheel touch time * update refs * fix unittest Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>pull/2276/head
parent
e51da619c1
commit
21d4ac1eeb
|
@ -14,9 +14,9 @@ EventName = car.CarEvent.EventName
|
|||
# We recommend that you do not change these numbers from the defaults.
|
||||
# ******************************************************************************************
|
||||
|
||||
_AWARENESS_TIME = 70. # one minute limit without user touching steering wheels make the car enter a terminal status
|
||||
_AWARENESS_PRE_TIME_TILL_TERMINAL = 15. # a first alert is issued 15s before expiration
|
||||
_AWARENESS_PROMPT_TIME_TILL_TERMINAL = 6. # a second alert is issued 6s before start decelerating the car
|
||||
_AWARENESS_TIME = 35. # passive wheel touch total timeout
|
||||
_AWARENESS_PRE_TIME_TILL_TERMINAL = 7.
|
||||
_AWARENESS_PROMPT_TIME_TILL_TERMINAL = 5.
|
||||
_DISTRACTED_TIME = 11.
|
||||
_DISTRACTED_PRE_TIME_TILL_TERMINAL = 8.
|
||||
_DISTRACTED_PROMPT_TIME_TILL_TERMINAL = 6.
|
||||
|
|
|
@ -141,7 +141,7 @@ class TestMonitoring(unittest.TestCase):
|
|||
# 5. op engaged, invisible driver, down to orange, driver touches wheel; then down to orange again, driver appears
|
||||
# - both actions should clear the alert, but momentary appearence should not
|
||||
def test_sometimes_transparent_commuter(self):
|
||||
_visible_time = np.random.choice([1, 10]) # seconds
|
||||
_visible_time = np.random.choice([0.5, 10]) # seconds
|
||||
# print _visible_time
|
||||
ds_vector = always_no_face[:]*2
|
||||
interaction_vector = always_false[:]*2
|
||||
|
@ -151,7 +151,7 @@ class TestMonitoring(unittest.TestCase):
|
|||
self.assertTrue(len(events_output[int(_INVISIBLE_SECONDS_TO_ORANGE*0.5/DT_DMON)]) == 0)
|
||||
self.assertEqual(events_output[int((_INVISIBLE_SECONDS_TO_ORANGE-0.1)/DT_DMON)].names[0], EventName.promptDriverUnresponsive)
|
||||
self.assertTrue(len(events_output[int((_INVISIBLE_SECONDS_TO_ORANGE+0.1)/DT_DMON)]) == 0)
|
||||
if _visible_time == 1:
|
||||
if _visible_time == 0.5:
|
||||
self.assertEqual(events_output[int((_INVISIBLE_SECONDS_TO_ORANGE*2+1-0.1)/DT_DMON)].names[0], EventName.promptDriverUnresponsive)
|
||||
self.assertEqual(events_output[int((_INVISIBLE_SECONDS_TO_ORANGE*2+1+0.1+_visible_time)/DT_DMON)].names[0], EventName.preDriverUnresponsive)
|
||||
elif _visible_time == 10:
|
||||
|
|
|
@ -1 +1 @@
|
|||
eaa9ac421abee09dfc2bac3b85423d3980f6e67b
|
||||
6acafbadc569c82412a2370e61d8de619255b25a
|
Loading…
Reference in New Issue