Repository navigation
Volvo/fix spa cruise freq - #7
Closed
cschmittiey wants to merge 230 commits into
Closed
cschmittiey wants to merge 230 commits into
cschmittiey wants to merge 230 commits into
Conversation
correct radar interface Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
…ommaai#2948) gm: Refactor to make branches clearer
* Add CarInterface.DRIVABLE_GEARS gears attribute * lil less
* less ignore * one more * one more * lil more
Fix typo in ignored rule
…maai#2996) hyundai: document SCC_CONTROL signal preservation for ACC cancel Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* build_env * default * conditional * need it there * try that * fix * rm those
* install mull on macOS * runs * run in ci * more readable * fail early * who doesn't have curl * fix that? * uv sourcing * unset that * mit * cleanup
* board/ is dead * add that back
* Chrysler: fix safety build on clang * misra
* safety: single libsafety.so * llvm
cleanup SecOC doc generation
VW: Allow PQ/MLB cars in dev builds
Bump CRV Hybrid to 2026
* VW PQ: Update HCA Status to use Mode 2 (Status 7) * VW PQ: update PQ safety test to use HCA status 7 --------- Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
* Add Lexus LS 2018 platform configuration * Add fingerprints for Lexus LS ECUs * Add LEXUS_LS to torque substitute * Update steer ratio for Lexus LS 2018 configuration * LS steer ratio back to 13.0 * Update steer ratio for Lexus LS 2018 based on live params * Add test route for Lexus LS * Update LS car docs to exclude LSS+ A package * Fix formatting in Lexus LS 2018 documentation
bump MDX to 2026
* whitelist Toyota hybrids for standstill resume behaviour * fixed logic for hybrid check * one check --------- Co-authored-by: Shane Smiskol <shane@smiskol.com>
Revert "safety: single libsafety.so (commaai#3013)" This reverts commit f812bf7.
Co-authored-by: Vehicle Researcher <user@comma.ai>
Scaffolds opendbc/safety/tests/test_volvo.py with TestVolvoCMA (safetyParam=0) and TestVolvoSPA (safetyParam=VOLVO_FLAG_SPA) sharing the generic CarSafetyTest harness plus a Volvo-specific test_gas_threshold_self_consistent regression guard. Without this, the CMA-vs-SPA gas-threshold scale mismatch that appeared on a real Polestar 2 drive (ECM_1.ACCELERATOR_PEDAL_POS is raw 0-255 on CMA but DBC-scaled percent on SPA) was only detectable via test_models.py on recorded routes. Now a laptop-only pytest run catches it. Also adds the Volvo sibling-exception in common.py test_tx_hook_on_wrong_safety_mode, matching the existing Subaru/Toyota pattern: CMA and SPA share TX_MSGS (static in volvo_init), so a TX from one while running tests for the other is expected. 38 pass, 31 skipped locally.
ECM_1.ACCELERATOR_PEDAL_POS on SPA is DBC-scaled to percent (factor 0.00390625, idle ~0%), but the existing check applied CMA's raw-count threshold (> 21) to both platforms. On a Polestar 2 (b7d9bddaf834065c/00000025--29eeffa499) this produced 545 frames of gasPressed disagreement per test_panda_safety_carstate run — openpilot's percent-scaled value never climbed above 21, so the pedal effectively read as released regardless of driver input. Branch on self.is_spa to use > 1.0% for SPA and keep the original raw > 21 for CMA. Values match volvo.h and are regression-guarded by test_volvo.py::test_gas_threshold_self_consistent.
Adds VOLVO_XC40_RECHARGE, VOLVO_S60_RECHARGE, and POLESTAR_2 to non_tested_cars so the test suite skips them with SkipTest instead of raising "missing test route" errors.
The carcontroller passed actuators.steeringAngleDeg straight to the EPS with no measurement clamp and no rate limit, leaving a TODO in place. Under a sustained driver override the model's planner sees the car drifting off-line and desiredCurvature grows unbounded — observed +6.5° desired vs -5° actual on Polestar 2 (11° gap). On release, the EPS slams toward that stale command and overshoots ~20°. Stock Volvo Pilot Assist keeps commanded-vs-actual inside ~2° even under 10+ count torque holds for 5+ seconds (measured across 9 PA-engaged segments on a reference dashcam route). Fix: - ANGLE_ERROR = 3.0° clamp against CS.out.steeringAngleDeg (analog of Ford's CURVATURE_ERROR). 3° leaves ~20% headroom over stock's observed worst case. - Wire apply_std_steer_angle_limits with the already-defined but unused ANGLE_LIMITS rate curves. - Both run before the live-testing override so test configs still bypass them. Sim of the observed override scenario: gap converges from -4.8° to +0.1° over 100ms instead of overshooting. See cschmittiey/openpilot#1 (rate limits), #2 (steeringPressed gating), #3 (VM jerk limits) for follow-ups.
Volvo: clamp commanded angle to actual ± ANGLE_ERROR + rate limit
The SPA_BUS1_CRUISE_CONTROL (0x349) safety rx_check declared 10 Hz, but the actual message rate is 5 Hz. The lagging threshold is MAX(timestep * 10, 1s), so at 10 Hz it was 1s — tight enough that normal driving with occasional ~1.6s gaps triggered false lagging. At 5 Hz the threshold becomes 2s, matching the real message cadence. Validated on POLESTAR_2 route b7d9bddaf834065c/00000025--29eeffa499 segments 1-30 (210/210 tests pass). Segments 0 and 31 still fail due to log-boundary artifacts (ELM boot period, end-of-drive relay closure), not the safety config. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Author
|
oops sorry, please ignore |
There was a problem hiding this comment.
Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- include a route or your device' dongle ID if relevant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.