Skip to content

Door unlatch controls (Android + iOS) and per-door / trunk status for dashboards - #272

Closed
ehoeve786 wants to merge 4 commits into
softwiredtech:mainfrom
ehoeve786:ccr-7f9495ac-w22zqz
Closed

ehoeve786 wants to merge 4 commits into
softwiredtech:mainfrom
ehoeve786:ccr-7f9495ac-w22zqz

Conversation

@ehoeve786

Copy link
Copy Markdown
Collaborator

Pairs with the DashKit firmware PR: softwiredtech/dashkit-firmware#89. Three commits: Android controls, iOS controls, door status.

Controls (Android + iOS): four momentary controls, Unlatch Driver / Passenger / Rear Left / Rear Right Door, sending CMD_DOOR_UNLATCH (0x50) with the door index 0–3. Gesture values 10–13 so they can be bound to multi-finger taps like the other controls. Strings in en/de/hu on both platforms (Icons.Rounded.MeetingRoom on Android, door.left/right.hand.open on iOS). The firmware replays the VCSEC_requests 0x1F9 closure request the Tesla app uses and refuses it in R/N/D; older firmware rejects the opcode as unknown.

Door status for dashboards: the firmware forwards VCLEFT_doorStatus 0x102, VCRIGHT_doorStatus 0x103 and VCLEFT_liftgateStatus 0x142. The shared bridge decodes them into six new CarState fields, exposed to web and Rive dash apps on both platforms:

key type meaning
doorOpenFL, doorOpenFR, doorOpenRL, doorOpenRR 0/1 1 while the latch reports OPENED / OPENING / AJAR / CLOSING; 0 for CLOSED, SNA and fault states
trunkOpen 0/1 rear trunk latch, same rule
trunkPosition degrees powered liftgate angle from mux 1, kept across mux-0 frames, clamped at 0 (closed reads slightly negative)
  • bridge: DOOR_OFFSET = 47, FIELD_COUNT = 53; BridgeCarState carries the same fields for iOS. Only TeslaDashKitMapper is wired, new_gen_juniper.dbc has no definitions for these messages yet.
  • Android: CarState, CanFrameDecoder, Rive dashValues, WebView getters getDoorOpenFL … getTrunkPosition.
  • iOS: CarState (bridge + Codable), Rive dashValues, WebView JSON.
  • dash-apps: README table, web-compose signal catalog (five warning booleans + trunk angle), host getter map, en/hu/de labels.

Verification: new host test tesla_closure_mapper_test (latch mapping, liftgate mux handling, array layout) passes alongside tesla_vin_mapper_test; node scripts/build-compose-widgets.js --check and validate-manifests.js pass. Android and iOS apps not built locally (no SDK / Xcode here); the Android control commit is the one fork PR #10's green CI built.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CiTeuLpxE64AAygE8U6A5F

Four momentary controls (driver, passenger, rear left, rear right) that
send VC_CMD_DOOR_UNLATCH with the door index; the DashKit replays the
VCSEC_requests closure request the Tesla app uses. They appear in the
Controls grid and the multi-finger gesture picker like the other controls.
Pairs with dashkit-firmware PR #9.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CiTeuM9buJMg6fPxajubfe
Same four momentary controls as the Android commit, with the same ids,
gesture values and opcode, so a gesture bound on either app runs the same
firmware action. Strings in en/de/hu.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CiTeuLpxE64AAygE8U6A5F
…oards

The DashKit forwards VCLEFT_doorStatus (0x102), VCRIGHT_doorStatus (0x103)
and VCLEFT_liftgateStatus (0x142); decode them in the shared bridge and
expose them to dash apps on both platforms.

- bridge: doorOpenFL/FR/RL/RR and trunkOpen are 1 while the latch reports
  OPENED, OPENING, AJAR or CLOSING and 0 for CLOSED, SNA or fault states.
  trunkPosition is the powered-liftgate angle in degrees from mux 1 of
  VCLEFT_liftgateStatus, kept across mux-0 frames and clamped at 0.
  Six slots after TPMS (DOOR_OFFSET = 47, FIELD_COUNT = 53); BridgeCarState
  carries the same fields for iOS.
- Android: CarState, CanFrameDecoder, Rive dashValues and the WebView
  bridge getters (getDoorOpenFL ... getTrunkPosition).
- iOS: CarState (bridge + Codable), Rive dashValues and the WebView JSON.
- dash-apps: README table, web-compose signals (five warnings booleans and
  a trunk angle number), host getter map and en/hu/de labels.
- Host test tesla_closure_mapper_test covers the latch mapping, the
  liftgate mux handling and the array layout.

Only the DashKit mapper is wired: new_gen_juniper.dbc has no definitions
for these messages yet.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CiTeuLpxE64AAygE8U6A5F
The firmware (softwiredtech/dashkit-firmware#89) refuses the unlatch in
R/N/D or above 0.5 kph, not "outside Park": a parked car in drive-system
standby no longer reports P. The first commit of this PR pairs with that
upstream PR, not with fork PR #9 as its message says.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CiTeuNGK1Ev4AkBBNFW1CT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants