controlsd+calibrationd: suppress commIssue from valid=False cascade
Two fixes that reinstate the pre-revert defenses against the "TAKE CONTROL IMMEDIATELY / Communication Issue" banner that fires when self-driving on the baseline modelrevert stack: calibrationd: publish valid based on calStatus == calibrated, not sm.all_checks(). Original gate cascaded upstream freq glitches into liveCalibration.valid=False, which kept locationd.filterInitialized False, which fed garbage into paramsd, which corrupted steerRatio (erratic steering). "valid" here is a question about convergence, not input freshness. controlsd: narrow the commIssue trigger to genuine comm failures — not_alive OR can_rcv_timeout. The `not sm.all_checks()` branch also picked up valid=False, but paramsd / torqued / plannerd / frogpilot_planner / dmonitoringd all propagate their sm.all_checks() into msg.valid via a polling-pattern artifact (freq_ok inside poll='...' subscribers tracks gaps between drain bursts rather than the publish rate), so the whole stack flaps valid and trips the banner during normal driving. Content and rate are fine; just the flag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -284,7 +284,14 @@ def main() -> NoReturn:
|
||||
|
||||
# 4Hz driven by cameraOdometry
|
||||
if sm.frame % 5 == 0:
|
||||
calibrator.send_data(pm, sm.all_checks())
|
||||
# CLEARPILOT: publish valid based on calibration status, not upstream sm.all_checks().
|
||||
# The original gate cascaded upstream freq glitches into liveCalibration.valid=False,
|
||||
# which kept locationd.filterInitialized False, which fed garbage into paramsd, which
|
||||
# corrupted steerRatio and caused erratic steering (and controlsd commIssue banners).
|
||||
# "valid" here semantically means "the calibration data is trustworthy" — a question
|
||||
# about convergence, not input freshness.
|
||||
cal_valid = calibrator.cal_status == log.LiveCalibrationData.Status.calibrated
|
||||
calibrator.send_data(pm, cal_valid)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user