Skip to content

hardwared: handle failed thermal reads - #38688

Closed
danielpolimac wants to merge 2 commits into
commaai:masterfrom
danielpolimac:fix/thermal-read-failure
Closed

hardwared: handle failed thermal reads#38688
danielpolimac wants to merge 2 commits into
commaai:masterfrom
danielpolimac:fix/thermal-read-failure

Conversation

@danielpolimac

Copy link
Copy Markdown

Summary

  • report failed thermal-zone reads as NaN instead of crashing hardwared
  • exclude non-finite sensor values when calculating control temperatures
  • add regression coverage for valid reads, I/O failures, missing files, malformed values, discovery failures, and temperature aggregation

Fixes #36690

Test plan

  • pytest -q openpilot/system/hardware/tests/test_hardwared.py (8 passed)
  • ruff check openpilot/common/hardware/base.py openpilot/system/hardware/hardwared.py openpilot/system/hardware/tests/test_hardwared.py

@github-actions

Copy link
Copy Markdown
Contributor

Process replay diff report

Replays driving segments through this PR and compares the behavior to master.
Please review any changes carefully to ensure they are expected.

✅ 0 changed, 66 passed, 0 errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hardwared: gracefully handle no thermal readings

2 participants