mirror of
https://jihulab.com/mr-one/openpilot.git
synced 2026-10-27 21:13:42 +08:00
test: sync selfdrived bookmark and model settling behavior
This commit is contained in:
@@ -205,6 +205,7 @@ class SelfdriveD:
|
||||
big_failed = big_active is False or model_unavailable or (self.big_model_active and not chestnut_present)
|
||||
if big_failed and not self.big_model_failed:
|
||||
self.events.add(EventName.bigModelFailed)
|
||||
self.big_model_ready_t = time.monotonic()
|
||||
self.big_model_failed = big_failed
|
||||
|
||||
# soft disable if the big model fails
|
||||
@@ -232,7 +233,9 @@ class SelfdriveD:
|
||||
|
||||
# Check for user bookmark press
|
||||
if self.sm.updated['userBookmark']:
|
||||
self.events.add(EventName.userBookmark)
|
||||
prime_type = self.params.get("PrimeType")
|
||||
paired = prime_type is not None and int(prime_type) >= 0
|
||||
self.events.add(EventName.userBookmark if paired else EventName.userBookmarkNotPaired)
|
||||
|
||||
# Don't add any more events while in dashcam mode
|
||||
if self.CP.passive:
|
||||
@@ -502,7 +505,7 @@ class SelfdriveD:
|
||||
|
||||
# TODO: fix simulator
|
||||
if not SIMULATION or REPLAY:
|
||||
if self.sm['modelV2'].frameDropPerc > 1:
|
||||
if self.sm['modelV2'].frameDropPerc > 1 and not big_model_settling:
|
||||
self.events.add(EventName.modeldLagging)
|
||||
|
||||
# mute canBusMissing event if in Park, as it sometimes may trigger a false alarm with MADS in Paused state
|
||||
|
||||
Reference in New Issue
Block a user