Repository navigation
TPMS: decode VCSEC_TPMSData (0x219) and expose tyre pressure and temperature in CarState - #270
Merged
Merged
Conversation
Contributor
|
@ehoeve786 This CAN message is not forwarded from the DashKit fw, is there firmware counterpart to this? |
Collaborator
Author
|
Submitted PR for the firmware that seems like I forgot. Should be cleaned up now. Less files changed. And no TPMSLatch, which was used to drop stale readings after 60 seconds... |
ehoeve786
marked this pull request as ready for review
October 30, 2026 20:32
ehoeve786
marked this pull request as draft
October 30, 2026 20:32
ehoeve786
force-pushed
the
tpms-decoder
branch
from
November 1, 2026 00:43
8b29b71 to
9a4e80a
Compare
VCSEC_TPMSData is 7 bytes on the vehicle bus with a 3-bit mux. Mux 5 carries
all four wheel pressures (0.025 bar); muxes 0-3 carry one sensor each
(pressure at 0.05 bar, temperature, sensor battery). Mux 4 is ignored.
- bus_1_tesla_vehicle.dbc (Android and iOS copies): 7-byte layout replacing
the 5-byte one.
- TeslaDashKitMapper: pressures from mux 5 only, temperatures from muxes
0-3 (mux 0 RR, 1 RL, 2 FR, 3 FL). The coarser per-sensor pressure is not
used so the value doesn't alternate with mux 5. "Not available" raw values
(0xFF) are rejected, fields keep their last value, and nothing is written
until a 0x219 frame has been seen.
- CarState: tpmsPressure{FL,FR,RL,RR} (bar, -1 = none) and
tpmsTemp{FL,FR,RL,RR} (degC, -100 = none) in 8 slots after the VIN
(TPMS_OFFSET = 39, FIELD_COUNT = 47).
- Android: FIELD_COUNT = 47; CanFrameDecoder reads the TPMS slots.
- iOS: BridgeCarState and Swift CarState carry the fields. Dashboard JSON is
unchanged.
- tesla_vin_mapper_test: the empty-VIN check stops at TPMS_OFFSET.
Mux-to-wheel mapping and scaling verified against four CAN logs
(2026-10-26..28): per-sensor pressures match mux 5 per wheel, and mux 5
updates follow per-sensor readings for the same wheel. Host tests pass and
the Android debug APK builds; iOS app not built.
Requires DashKit firmware that forwards 0x219 (dashkit-firmware
tpms-7byte-layout).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ehoeve786
force-pushed
the
tpms-decoder
branch
from
November 1, 2026 00:58
9a4e80a to
aee9821
Compare
ehoeve786
marked this pull request as ready for review
November 1, 2026 01:43
wpmed92
approved these changes
Nov 1, 2026
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
VCSEC_TPMSData(0x219) is 7 bytes with a 3-bit mux. Mux 5 carries all four pressures; muxes 0-3 carry one sensor each (0 RR, 1 RL, 2 FR, 3 FL).TeslaDashKitMapper: pressures from mux 5, temperatures from muxes 0-3. Rejects no-reading (0xFF) values; each wheel keeps its last value. Nothing is written until a 0x219 frame has been seen.CarState:tpmsPressure{FL,FR,RL,RR}(bar, -1 = none) andtpmsTemp{FL,FR,RL,RR}(°C, -100 = none) in slots 39-46 after the VIN;FIELD_COUNT= 47. Android (CarState.kt,CanFrameDecoder.kt) and iOS (bridge struct,CarState.swift) carry them through.No dashboard displays the values yet. Needs softwiredtech/dashkit-firmware#88, which forwards 0x219.
Testing
tesla_vin_mapper).🤖 Generated with Claude Code