mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-30 04:03:44 +08:00
selfdrived: no localizer alerts from capnp defaults (#38840)
selfdrived: don't alert on a message that was never received posenetInvalid, locationdTemporaryError and paramsdTemporaryError are raised off the capnp defaults of deviceMotion and vehicleParameters before either message has ever arrived. When modeld is down, locationd and paramsd never publish, the defaults read as a nan posenet speed, and that NoEntryAlert can hide the process not running alert that names modeld. Same guard as the big model alert in #38500.
This commit is contained in:
@@ -398,11 +398,12 @@ class SelfdriveD:
|
||||
self.logged_comm_issue = None
|
||||
|
||||
if not self.CP.notCar and not big_model_settling: # localization has nothing to work with during the load
|
||||
if not self.sm['deviceMotion'].posenetOK:
|
||||
# the defaults of a message that was never received are not a localizer failure
|
||||
if self.sm.seen['deviceMotion'] and not self.sm['deviceMotion'].posenetOK:
|
||||
self.events.add(EventName.posenetInvalid)
|
||||
if not self.sm['deviceMotion'].inputsOK:
|
||||
if self.sm.seen['deviceMotion'] and not self.sm['deviceMotion'].inputsOK:
|
||||
self.events.add(EventName.locationdTemporaryError)
|
||||
if (not self.sm['vehicleParameters'].valid and cal_status == log.ExtrinsicsCalibration.Status.calibrated and
|
||||
if (self.sm.seen['vehicleParameters'] and not self.sm['vehicleParameters'].valid and cal_status == log.ExtrinsicsCalibration.Status.calibrated and
|
||||
not TESTING_CLOSET and (not SIMULATION or REPLAY)):
|
||||
self.events.add(EventName.paramsdTemporaryError)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user