Skip to content

feat: support the p987 vehicle type in the dashboard - #229

Merged
BK1031 merged 2 commits into
mainfrom
bk1031/dashboard-p987
Aug 29, 2026
Merged

BK1031 merged 2 commits into
mainfrom
bk1031/dashboard-p987

Conversation

@BK1031

@BK1031 BK1031 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

A 987 vehicle could not be created, and if it had been it would have rendered with no widgets.

vehicle — register p987 as a vehicle type. Vehicles are validated against this list and the dashboard's type dropdown reads it from /vehicle-types, so nothing else works without it. Ordered first as the newest car.

dashboard — add a p987 widget registry. getWidgetRegistry returned {} for unrecognised types.

  • TCM Resources — CPU/memory/disk/temperature plus throttle flags
  • TCM Status — the 0x200 connectivity bits and round-trip time
  • Engine (DME), Stability (PSM), Steering (SCCM), Transmission (PDK) — debug widgets over the DBC-decoded signals

Groups are the car's own ECUs rather than GR-designed nodes, since the 987 runs stock Porsche CAN. The four ECU widgets share one component and pass their own signal list from p987/live/signals.ts — gr26 writes one longhand per node, which doesn't scale to seven ECUs.

The TCM widget is not a copy of gr25's: the 987's TCM is a Pi Zero 2 W, so it shows four cores instead of six and drops the GPU and power-rail readings the board has no sensors for. Throttle flags take their place and separate "active" from "seen since boot" — a set since-boot flag with a clear live flag means the event happened earlier in this power cycle, which is what you want to know after a session.

Worth knowing

  • Signal names assume the powertrain bus is labelled pcan. Names are <bus>_<signal> and the bus comes from the relay's CAN_INTERFACES (can0:pcan in TCM-987's example.env). Relabel the interface and signals.ts has to follow. It's one const bus at the top of that file.
  • The DME list is a subset. The DBC gives ~100 DME signals across eight frames; I included what describes engine behaviour and left out counters, checksums and software-revision bytes. Easy to extend.
  • PDK signals stay at zero on a manual car — noted in the widget description.
  • No preview images. These point at /widgets/p987/*.png, which don't exist yet — same as gr25's widgets, whose previews were never added either. The picker shows a broken image until someone screenshots them.
  • Steering angle and rate are magnitude-only with separate sign bits, so both are shown rather than combined into a signed value.

tsc --noEmit, npm run build and eslint all clean; vehicle builds and vets clean.

BK1031 added 2 commits August 29, 2026 11:55
Vehicles are validated against this set, so without it a 987 cannot be
created at all — and the dashboard's type dropdown reads the same list.
Ordered first as the newest car.
getWidgetRegistry returned an empty object for anything it did not
recognize, so a 987 vehicle rendered with no widgets to choose from.

Groups are the car's own ECUs rather than GR-designed nodes, since the
987 runs stock Porsche CAN. The four ECU debug widgets share one
component and pass their own signal list — gr26 writes one longhand per
node, which does not scale to the seven ECUs the 987 decodes.

The TCM widget is deliberately not a copy of gr25's: the 987's TCM is a Pi
Zero 2 W, so it shows four cores instead of six and drops the GPU and
power-rail readings the board has no sensors for. The throttle flags take
their place, and separate "active" from "seen since boot" — a set
since-boot flag with a clear live flag means the event happened earlier in
this power cycle, which is exactly what you want to know after a session.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T18:58:42.812777Z 177092e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@BK1031
BK1031 merged commit 0a7af4c into main Aug 29, 2026
22 checks passed
@BK1031
BK1031 deleted the bk1031/dashboard-p987 branch August 29, 2026 18:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 177092ed0b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// VehicleTypes is the canonical ordered list (newest first), surfaced via the
// API so the frontend's create-vehicle and flag dialogs don't hardcode it.
var VehicleTypes = []VehicleType{GR26, GR25, GR24}
var VehicleTypes = []VehicleType{P987, GR26, GR25, GR24}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add the p987 vehicle icon

Once a p987 vehicle is created, the sidebar switcher, vehicle list, and vehicle details page all request /icons/cars/p987-pixel.png, but no such asset exists under dashboard/public/icons/cars and these image components have no fallback. Consequently every standard vehicle view displays a broken image for the newly exposed type; add the asset or provide a generic fallback before registering it.

Useful? React with 👍 / 👎.

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.

1 participant