Skip to content

tesla_preap: publish enableLongControl on CarState - #6

Closed
daggerhashjack wants to merge 2 commits into
nap-devfrom
cursor/publish-enable-long-c99e
Closed

daggerhashjack wants to merge 2 commits into
nap-devfrom
cursor/publish-enable-long-c99e

Conversation

@daggerhashjack

Copy link
Copy Markdown

Description

Publish the Pre-AP FSM enableLongControl flag on CarState so selfdrived can chime on long-control edges instead of interceptor authority or the long-lived cruise session.

pedalLongActive is accepted interceptor authority. Gas override drops that while enableLongControl stays true. Brake and first-pull drop enableLongControl while cruiseEnabled stays. Those two cases are indistinguishable from pedalLongActive + cruiseState.enabled alone (pedal-up handshake looks the same as a lat-only drop).

Companion openpilot change binds pedalCruiseEnabled / pedalCruiseDisabled to this field.

Verification

  • test_enable_long_control_publishes_fsm_flag_not_interceptor_authority (long on, authority off)
  • Schema field listed in test_nap_specific_fields_on_carstate

No DAS spoof. No naponsp-dev / Sunny EPAS. No AGNOS / 0.11.1.

Interceptor authority (pedalLongActive) drops on gas override while the
FSM long flag stays true. Brake and first-pull drop the FSM flag while
cruise stays. Publish enableLongControl so selfdrived can chime on those
edges instead of the long-lived cruise session.
Empty CAN defaults doors to OPEN and gear to invalid, so check_can_engage
cleared the FSM flag before CarState published it. Drive + closed doors
keep the flag so the test can distinguish it from interceptor authority.
@daggerhashjack
daggerhashjack marked this pull request as ready for review August 29, 2026 02:24
@daggerhashjack
daggerhashjack requested a review from SloPOS as a code owner August 29, 2026 02:24
@daggerhashjack

Copy link
Copy Markdown
Author

Already covered on nap-dev. Closing.

@daggerhashjack
daggerhashjack deleted the cursor/publish-enable-long-c99e branch August 29, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants