Repository navigation
feat(tesla/preap): Bosch radar VIN learning, upside-down radar orientation support, and pedal calibration fixes - #33
Merged
Conversation
added 4 commits
October 12, 2026 13:28
…own, and pedal calibration fixes
Panda permission can arrive after the first stalk event. Distinguish a pending grant from permission loss so hands-on pause does not immediately undo engagement, while keeping acquisition bounded and real permission loss immediate.
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.
Summary
This PR adds end-to-end Bosch MRR radar VIN learning, support for physically inverted (upside-down) radar mounts with a reboot prompt, and resolves multiple timing and state issues in the Comma Pedal calibration tool for Tesla Pre-AP vehicles.
Changes
1. Bosch Radar VIN Learning
vin_learn_radar.py): Automates Gateway CAN feed spoofing (0x405/0x398) to program donor vehicle VIN and configuration data into retrofit Bosch radars.NAPRadarPositiondirectly from openpilot Params and sets the appropriate 2WD/AWD drive-type bits dynamically to prevent radar configuration mismatch DTCs.2. Invert Radar Orientation (Upside-Down Mount Support)
yRel = -yRel) and lateral velocity (yvRel = -yvRel) inradar_interface.pyto ensure stable tracking when the radar is mounted inverted.3. Comma Pedal Calibration Fixes
send_heartbeat(False, False)calls totransport.pyduring pedal calibration to prevent modern Panda safety firmware from dropping intoSAFETY_SILENTafter 1 second.calibrate_pedal.pywhere active throttle actuation (pedal_interceptor_state == 1) in Stage 3 (Detecting Pedal Max) was treated as a fault, eliminating the false"Pedal communication timeout"error.Verification & Testing