Skip to content

hardwared: ignore invalid thermal readings - #39014

Closed
ousamabenyounes wants to merge 1 commit into
commaai:masterfrom
ousamabenyounes:fix-hardwared-thermal-readings-36690
Closed

ousamabenyounes wants to merge 1 commit into
commaai:masterfrom
ousamabenyounes:fix-hardwared-thermal-readings-36690

Conversation

@ousamabenyounes

Copy link
Copy Markdown

Fixes #36690.\n\n## Summary\n- return NaN for thermal-zone read errors so failed readings stay visible in logs\n- keep the existing zero fallback for absent thermal zones\n- ignore non-finite temperatures when deriving thermal-status/fan inputs so a failed sensor read does not poison downstream filters\n\n## Tests\n- RED: PYTHONPATH=$BASE_WT uv run --frozen --with pytest python -m pytest -q openpilot/common/tests/test_hardware_thermal.py on base failed with ImportError: cannot import name 'max_valid_temperature'\n- GREEN: PYTHONPATH=$THERMAL_WT uv run --frozen --with pytest python -m pytest -q openpilot/common/tests/test_hardware_thermal.py -> 3 passed\n- PYTHONPATH=$THERMAL_WT uv run --frozen --with ruff ruff check openpilot/common/hardware/base.py openpilot/system/hardware/hardwared.py openpilot/common/tests/test_hardware_thermal.py -> passed\n

@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