Skip to content

mazda: independent TJA/MRCC - #16

Closed
mzdnick wants to merge 1 commit into
zoompilot:developfrom
mzdnick:mazda-tja-mrcc-cleanup
Closed

mzdnick wants to merge 1 commit into
zoompilot:developfrom
mzdnick:mazda-tja-mrcc-cleanup

Conversation

@mzdnick

@mzdnick mzdnick commented Sep 17, 2026

Copy link
Copy Markdown

Problem

On a TJA-equipped car the wheel TJA button arms MRCC as a side effect of the press, and the wheel's frame reaches bus-0 ECUs directly, so the arm cannot be prevented. The driver pressed the lane keeping button and got a cruise state they did not ask for.

Fix

  • Respect MRCC status when pressed. The controller sends a duplicate command immediately after to cancel out the original command issued from TJA press.
  • Sends one exact active-low CRZ_BTNS shape over the shared ICBM pacing, at most three frames, ended by raw PEDALS confirming the arm is gone.
  • The driver's own presses always win; nothing is sent during the held press or a stock-ECU handback. If the budget runs out with the arm alive, the controller stands down and leaves it to the driver.
  • panda permits exactly that frame shape, gated on the button declaration plus live cruise arming. DBC: BIT1_INV added to pack it. Change affects only cars who enabled the TJA option.

Validation

  • mazda tests: 572 passed
  • awaiting a validation drive

Credit

@chinna244

AI Usage

Disclaimer: GLM-5.3 by Z.ai was used to help develop, debug, and document this submission. All changes were reviewed and validated by me.

@mzdnick
mzdnick force-pushed the mazda-tja-mrcc-cleanup branch from 5fd404d to b85f071 Compare September 18, 2026 00:16
@mzdnick mzdnick changed the title mazda: prevent TJA-press MRCC arm, display HUD white wheel with lateral mazda: independent TJA lat/long, display HUD white wheel with lateral Sep 18, 2026
@mzdnick
mzdnick force-pushed the mazda-tja-mrcc-cleanup branch 2 times, most recently from 5d37795 to f7ba1d6 Compare September 18, 2026 05:15
@mzdnick mzdnick changed the title mazda: independent TJA lat/long, display HUD white wheel with lateral mazda: independent TJA/MRCC Sep 18, 2026
@mzdnick
mzdnick force-pushed the mazda-tja-mrcc-cleanup branch 3 times, most recently from 25c3c1e to 9752d26 Compare September 18, 2026 16:14
The physical TJA button arms MRCC on bus 0 as a side effect of the press
the driver declared as the lateral switch; the frame reaches bus-0 ECUs
directly, so the arm cannot be prevented. When MRCC was off before the
press, the controller answers the arm with the same MRCC master press
the driver would use: one exact active-low CRZ_BTNS shape, one frame per
body-paced 200 ms slot, at most three frames per unreconciled arm, never
sent while PEDALS reads disarmed, stopped by raw PEDALS confirming the
arm is gone. The body drops discrete presses faster than one per 200 ms,
and the disarm reaches PEDALS ~80 ms after a press plus the 50 ms
confirm, so the 200 ms slot keeps the stand-down ahead of the next
press. The driver's own cruise presses, a held TJA press, and radar or
stock-ECU transitions all stand down, and ICBM stands down through the
whole TJA hold: the wheel's press pattern owns the counter stream until
release. A car that never arms through the press stands down after 1 s
of brake-free time, since PEDALS cannot witness an arm under braking.
The wheel's MRCC master press publishes mainCruise on declared cars,
held unpressed until the wheel's first frame. The new safety permission
is the exact frame shape gated on the button declaration plus live
cruise arming; an undeclared car changes nothing.

Validation: 572 mazda car tests + 283 mazda safety tests host-side, ruff clean.
@mzdnick
mzdnick force-pushed the mazda-tja-mrcc-cleanup branch from 9752d26 to 7e41b02 Compare September 18, 2026 17:28
@mzdnick
mzdnick marked this pull request as ready for review September 18, 2026 19:21
@mzdnick mzdnick closed this Sep 20, 2026
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.

1 participant