Skip to content

Subaru preglobal: include front-left wheel speed in movement detection - #3735

Closed
joedlai wants to merge 1 commit into
commaai:masterfrom
joedlai:bounty/subaru-wheel
Closed

Subaru preglobal: include front-left wheel speed in movement detection#3735
joedlai wants to merge 1 commit into
commaai:masterfrom
joedlai:bounty/subaru-wheel

Conversation

@joedlai

@joedlai joedlai commented Sep 10, 2026

Copy link
Copy Markdown

Superseded by #3741 to submit this work from khchen428. The code and commits are unchanged. Please continue review on the replacement PR.

Preglobal Wheel_Speeds contains four 16-bit wheel speeds, with FL beginning at bit 0. The existing 12-bit shift discards most of the FL signal, so motion reported only by FL can be treated as standstill and miss the held-brake motion disengagement. Read the complete first word when detecting movement.

Add regressions for each wheel independently, zero/nonzero transitions around the discarded-bit boundary, and disengagement when a wheel starts moving while the brake is held. Both preglobal steering-polarity configurations are covered.

Preglobal platforms remain dashcamOnly and this safety mode is debug-gated; this does not add vehicle support.

Validation: the unchanged baseline fails six regression assertions; the fixed full safety suite runs 3,166 tests (2,774 passed, 392 skipped) and passes the 100% line-coverage gate (2,346/2,346 lines). Ruff, ty, cpplint, codespell, and the repository-configured MISRA analysis pass. An independent DBC roundtrip and 192 single-bit cases across all three preglobal DBC variants find zero missed movement or held-brake disengagements after the fix (36 of each before).

@github-actions github-actions Bot added the car safety vehicle-specific safety code label Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Car behavior report

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

Testing 79 segments for: SUBARU_ASCENT, SUBARU_OUTBACK, SUBARU_LEGACY, SUBARU_IMPREZA, SUBARU_IMPREZA_2020, SUBARU_FORESTER, SUBARU_OUTBACK_PREGLOBAL, SUBARU_OUTBACK_PREGLOBAL_2018, SUBARU_FORESTER_2022

✅ 0 changed, 79 passed, 0 errors

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

Labels

car safety vehicle-specific safety code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant