Repository navigation
Implement sport kick-down automation - #73
Merged
Merged
Conversation
Contributor
Author
|
Closes #75 |
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.
Switches the pedal map from Chill to Sport while the accelerator is held past
a threshold in Drive, and reverts when the pedal is released.
How it works
DI_systemStatusframe, readDI_accelPedalPosandDI_gear.Pedal >= threshold in Drive starts injection; pedal < threshold-10 stops it
(hysteresis so hovering on the line doesn't flap the torque map).
UI_powertrainControlframe at 10 ms: only
UI_pedalMapis overwritten, every other signal staysas the car emits it. Counter is seeded from the car's last frame; checksum
is recomputed by the DBC layer.
the UI, or the automation is disabled. Does nothing if the car is already
in Sport.
DBC
UI_powertrainControlmoved from 0x313 to 0x334 on current Tesla firmware(2026.x). Located via the tesla-can-explorer dataset and confirmed on the bus.
UI_pedalMapwidened from 1 to 2 bits (explorer lists a third value,PERFORMANCE). Bit 5 = Sport verified against the car's UI.
used_messages.txtas bus 1 decode; tables regenerated.BLE opcodes (config only, persisted in NVS)
0x49 VC_CMD_SPORT_KICKDOWN_ENABLE— 1/00x4A VC_CMD_SPORT_KICKDOWN_THRESHOLD— pedal percent, clamped 10..95,default 80
Logs (
sport_kd)READYat boot,START/STOP (reason), throttledTX 0x334, and anRX 0x334line whenever the car's payload changes (counter/checksum masked).Tested on the car: START/TX/STOP cycle observed and Sport engaged while held.
Companion app change: dashpilot-android
sport-kick-downbranch.