tesla_preap: chime pedal cruise on enableLongControl edges - #27
Closed
daggerhashjack wants to merge 3 commits into
Closed
daggerhashjack wants to merge 3 commits into
daggerhashjack wants to merge 3 commits into
Conversation
Session-based chimes stayed armed while cruiseEnabled, so brake and first-pull to lat-only never played pedalCruiseDisabled, and re-engaging long never played pedalCruiseEnabled. Bind those events to the FSM long-control flag. Gas override still does not chime on pedal-up. Co-authored-by: Daggerhashimoto <daggerhashjack@users.noreply.github.com>
Point at the CarState field plus the drive/doors fixture so check_can_engage does not clear the FSM flag before publish. Co-authored-by: Daggerhashimoto <daggerhashjack@users.noreply.github.com>
The NAP fixture policy is an attested hash. Adding a CarState field broke every fixture_tool unit test. Chimes read the live FSM flag; old fixtures defaulting to false is fine. Co-authored-by: Daggerhashimoto <daggerhashjack@users.noreply.github.com>
daggerhashjack
marked this pull request as ready for review
August 29, 2026 02:24
Author
|
Already on nap-dev via the session latch (PR #26). Closing. |
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.
Description
Pedal engage/disengage chimes were keyed off
update_pedal_cruise_session, which stays true whilecruiseEnabledafter the first authority accept. Brake or first-pull dropsenableLongControland keeps cruise, so the session never went 1→0 andpedalCruiseDisablednever fired. Re-engaging long while cruise was already on never went 0→1 either.5570441 correctly stopped chiming gas override (authority drop / pedal-up). The session latch was too wide.
This binds
pedalCruiseEnabled/pedalCruiseDisabledtoenableLongControledges:enableLongControl0→1) → engage chimeenableLongControl1→0, cruise stays) → disengage chimeenableLongControlstays true → no extra chime (OVERRIDE prompt unchanged)Companion opendbc PR publishes
CarState.enableLongControl(FSM flag, not interceptor authority).Verification
Unit tests in
selfdrive/selfdrived/tests/test_preap_regen.py:Files / events
selfdrive/selfdrived/preap_regen.py—pedal_long_chimereplacesupdate_pedal_cruise_sessionselfdrive/selfdrived/selfdrived.py— fires existingpedalCruiseEnabled/pedalCruiseDisabledopendbc_repobump —CarState.enableLongControlpedalCruiseEnabled,pedalCruiseDisabledNo DAS spoof. No naponsp-dev / Sunny EPAS. No AGNOS / 0.11.1 merge.