mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
test_time_to_onroad: log events after onroad/timeout (#31359)
* log events * only on fail old-commit-hash: 4fea2a343a53ab2523668f0bd08bac2753b76132
This commit is contained in:
@@ -21,12 +21,15 @@ def test_time_to_onroad():
|
||||
sm = messaging.SubMaster(['controlsState', 'deviceState', 'onroadEvents'])
|
||||
try:
|
||||
# wait for onroad
|
||||
with Timeout(20, "timed out waiting to go onroad"):
|
||||
while True:
|
||||
sm.update(1000)
|
||||
if sm['deviceState'].started:
|
||||
break
|
||||
time.sleep(1)
|
||||
try:
|
||||
with Timeout(20, "timed out waiting to go onroad"):
|
||||
while True:
|
||||
sm.update(1000)
|
||||
if sm['deviceState'].started:
|
||||
break
|
||||
time.sleep(1)
|
||||
finally:
|
||||
print(f"onroad events: {sm['onroadEvents']}")
|
||||
|
||||
# wait for engageability
|
||||
with Timeout(10, "timed out waiting for engageable"):
|
||||
|
||||
Reference in New Issue
Block a user