Skip to content

waze-on-cluster, app: a turn card over the cluster map - #274

Open
italomoraes wants to merge 2 commits into
robertnisipeanu:mainfrom
italomoraes:turn-card
Open

italomoraes wants to merge 2 commits into
robertnisipeanu:mainfrom
italomoraes:turn-card

Conversation

@italomoraes

@italomoraes italomoraes commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

A turn card: the next manoeuvre (an arrow, the distance and the road) drawn over the cluster map, below the position arrow (one line, under the street name the phone writes there) or at the top of the map (two lines). It is off unless turned on in the app, and it shows only with the map on the cluster's map slot at its own size (not hosted, not scaled, not on the HUD).

What it shows. While the BMW navigation guides, CarPlay's guidance included, the card shows the next manoeuvre as the cluster's own route box has it. waze-on-cluster reads GuidanceEventList (SOME/IP 0xFB1B, event 0x8002) and whether the navigation guides (Guidance 0xFB1A, event 0x8015) as uid 5000, the way the HMI does, and only reads (src/guidance_link.h, src/route_box.h). It knows turns (straight on, left, slight, sharp, right, U-turn), forks (keep left or right), roundabouts (the exit's angle and number) and the destination (its side), with distances in metres or kilometres. A kind not seen on a drive yet (a ferry, a motorway entry) gets a plain mark with the distance and the road, and the log names its number once, never the road. While the navigation guides, the box empties now and then (a route's start, a recalculation); through those spells the card keeps an instruction with no distance, such as the route's "towards …", and one with a distance for 2.5 s (src/guided_card.h).

Drawing. src/turn_card.h: arrows in BMW's style (the way to go heavy and white, the roads not taken grey) and antialiased Roboto 2.137 rendered ahead of time (src/card_font.h, tools/card_font.py; Apache License 2.0, native/waze-on-cluster/LICENSES/Apache-2.0.txt), with Latin, Greek and Cyrillic letters. A line that does not fit ends in an ellipsis. Only the rectangle of the pixels that changed is sent. make build/host/turn_card_preview draws every kind of card as one picture.

App. The main page gets Turn card (Off, Below the arrow, At the top), which waze-on-cluster keeps in turn_card_state_file, and Show an example, an example card for 10 seconds. The example goes over the navigation's card for 12 s at most, since the app's own end does not come while its page is in the background (src/card_choice.h). The new words are in every locale. The app requires the waze-on-cluster released with it ("next" in its release.json).

src/keys.cpp defines every settings key the shipped conf sets, so a new key cannot stop the tool at start: test/keys_test.cpp loads the shipped conf the way the program does.

The phone's own turn card (the second commit, for vijay38454's report on this pull request). With the turn card on, Apple Maps drew its own manoeuvre card in the CarPlay map below ours: Edit 6's ShowUI asks the phone for its full cluster page, maps:/car/instrumentcluster?showETA=yes. While the card shows (Below the arrow or At the top), the patch asks for maps:/car/instrumentcluster/map instead, the map alone that Edit 5 already gives the display; Apple Maps' arrival-time card goes with it. There is no new setting: with the Turn card off, everything is as before. The map URL sits at the same place in Edit 6's log text, NULs after it, and the call site is the same (carplay_locate.js, PATCH.md "Edit 6"). patchd plans it from the render's saved choice (turn_card_state_file): at the Patch button, an install and boot recovery's plan, and on the app's new {"cmd":"turn-card"}, which the app sends once the render shows a new choice. That one restarts carplay where patchd may, as the Patch button does, so the phone gets the new URL at once; where it may not, and at an install, carplay keeps running the patch, which patchd counts as patched with nothing pending, and asks for the new URL from its next start. A patch planned again for the other URL stays proven, since only the URL the phone is asked for differs. Being a commit of its own, it can be reviewed, or left out, apart from the card.

A new feature: patch is fine, or release:minor if you prefer.

AI: Claude Code: Claude Opus 5.5 read the navigation's messages in my car's captures and wrote the change, its tests and this description; Claude Fable 5.2 wrote the first draft of the card's drawing (src/turn_card.h and src/turn_card.cpp).

Tested:

  • This branch is rebased on your main of 24/11, evening (cluster-render 0.8.12, waze-on-cluster 0.14.14, the app 0.6.16), its CHANGELOG entries under Unreleased. On it:
    • waze-on-cluster make test-x86 (the unit's toolchain in Docker): 669 checks, 0 failed, with the new turn_card_test, route_box_test and keys_test, and new map_feed_test cases. make target builds, its 22 imports all exported by the unit's libraries.
    • waze-on-cluster's Node tests with Node 22 on macOS, in a clone with your release tags: all pass but rollback_test's checks of a capture left open and restored, which fail on this Mac on your main too. Among them, the new patchd_card_test (18 checks) runs patchd on a synthetic carplay through Turn card changes, with a restart where patchd may restart carplay and none where it may not, an install, Remove patch, the Patch button and boot recovery's plan; and 10 new locate_test checks cover the map form.
    • app: tools/test_control.js 54/54, test_page.js, test_profiles.js 21/21 and test_i18n.js (32 locales); release/test/release_test.js 18/18; release.js versions against your main passes.
  • My fork's Test workflow passed, every job, on its main with both commits, over your cluster-render 0.8.11 and waze-on-cluster 0.14.12: https://github.com/italomoraes/idrive-apps/actions/runs/45480931439
  • On my car, iDrive 7 (MGU), firmware P18_23w44.2-1-3, CarPlay 22.28.3, an iPhone, from my fork:
    • The card, 20 to 23/11/2026, with Google Maps: at the top and below the arrow, with the example and with the navigation's manoeuvres on drives, seen with turns, the destination and a route's "towards …". The last drives, on 23/11, ran on top of your waze-on-cluster 0.14.10, with my fork's cluster-render 0.8.8 (your 0.8.7 with the change from cluster-render: ask for the map again after a guide hold's cover #273).
    • The phone's own card, 24/11/2026, with your cluster-render 0.8.11: with Apple Maps, the Turn card off showed Apple's card and at the top only ours, and each change reconnected CarPlay in a few seconds; with Google Maps the map showed with the card at the top, as before.
    • The rebased branch itself has not been on my car.
  • Forks, roundabouts and distances in kilometres were checked against route boxes my car recorded on drives on 21/11 (route_box_test has them).
  • Not tested: Android Auto, Waze (it sends no manoeuvres, so no card), roundabouts in left-hand traffic, a ferry or a motorway entry, iDrive 8 (the app is ID7 only), and a car where patchd may not restart carplay, where the phone's card follows at the next start (patchd_card_test covers it).

Human review: yes: I tested it on my car and read this description before opening it.

Screenshots: photos of my car's screens, taken near home, so the map is blurred and road names are hidden (the card's road too).

Cluster, before (no card):

Before: no card

After, the navigation's manoeuvre at the top and below the arrow:

After: at the top
After: below the arrow

After, Show an example at the top and below the arrow:

Example at the top
Example below the arrow

App page, after: the Turn card and Show an example rows. I have no photo of it before; it is the same page without those two rows.

App page

The phone's own card, with Apple Maps (my profile picture hidden too; the app is in Portuguese: "Card de manobra" is Turn card). Turn card off ("Desativado"), Apple Maps draws its card:

Turn card off: Apple Maps draws its card

Turn card at the top ("No topo"), only ours (its road hidden):

Turn card at the top: only ours

🤖 Generated with Claude Code

@vijay38454

Copy link
Copy Markdown

@italomoraes One request to go with the turn card:

Problem: with Turn card on and Apple Maps, there are two cards: yours at the top and Apple's own glossy manoeuvre card drawn inside the video just below it. That's because Edit 6's ShowUI asks the phone for its full cluster page (maps:/car/instrumentcluster?showETA=yes, PATCH.md "Edit 6"). Google Maps draws no card of its own, so only Apple is affected.

Recommended solution: a "Hide phone's turn card" option for CarPlay, matching the existing Android Auto one

The app already has Hide phone's turn card for Android Auto. CarPlay could get the same checkbox.
When ticked, Edit 6's ShowUI sends maps:/car/instrumentcluster/map (map only) instead of maps:/car/instrumentcluster?showETA=yes. The phone then streams the map without its own card.
Off by default, so Robert's preferred behaviour (showETA cards) stays the default. It would make sense to suggest it, or tick it automatically, when the Turn card is set to Top.
Like the Android Auto option, it takes effect at the next CarPlay start or head-unit restart, since the URL is part of the patch.

Why this approach

Smallest change: Edit 5 already uses exactly this URL at connect. At 32 bytes it should fit Edit 6's 40-byte URL space (carplay_locate.js, SHOWUI_FORM), so it's a second value for an existing edit, not a new edit.
Consistent: same name, place and behaviour as the Android Auto option users already know.
No cropping: the picture is untouched; the phone simply isn't asked for its card.

Things to check

The app currently treats a non-standard map URL as "Update needed", so that check would need to accept the second value.
With map-only, Apple's arrival-time pill disappears too. The turn card covers the turn information, but the ETA is lost.
Untested on a car: whether Apple Maps honours /map when it comes through ShowUI (Edit 5's notes say the phone ignores options in the initial URL).

I'm happy to test it on my G20 with Apple Maps and send Save logs and photos.

italomoraes and others added 2 commits November 24, 2026 17:43
The next manoeuvre (an arrow, the distance and the road) drawn as an image
layer over the cluster map, below the phone's position arrow or at the top
of the map; off by default. While the BMW navigation guides, CarPlay's
guidance included, the card follows the cluster's route box, read over
SOME/IP (GuidanceEventList, 0xFB1B event 0x8002) as uid 5000, the way the
HMI reads it, and only read. The app's Show an example goes over it for
12 s at most.

- waze-on-cluster: turn_card (the drawing; Roboto rendered ahead of time,
  Apache License 2.0), route_box and guidance_link (reading the box),
  guided_card and card_choice (what shows when), turn_card_setting (the
  app's choice, kept in turn_card_state_file) and keys (every settings key
  the shipped conf sets is defined), with tests and a preview tool.
- app: Turn card (Off, Below the arrow, At the top) and Show an example on
  the main page, in every locale. Requires the next waze-on-cluster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the turn card on, Apple Maps drew its own turn card in the CarPlay
map below ours: Edit 6's ShowUI asks the phone for its full cluster page,
maps:/car/instrumentcluster?showETA=yes. While the card shows, the patch
now asks for maps:/car/instrumentcluster/map instead, the map alone that
Edit 5 already gives the display, at the same place in the same log text;
the call site is the same. The arrival-time card goes with it.

carplay_locate.js recognises the map form, carplay_patch.js plans it with
--showui map, and status, overlay and verify name it. patchd plans it
while the render's saved choice (turn_card_state_file) is bottom or top:
at the Patch button, an install and boot recovery's plan, and on the
app's new {"cmd":"turn-card"}, sent once the render shows a new choice,
where an enabled patch with the other URL is planned again and carplay
restarted where patchd may, as the Patch button does, so the phone gets the
new URL at once. Where patchd may not, and at an install, carplay keeps
running the patch, which counts as patched with nothing pending, and asks
for the new URL from its next start. A patch planned again for the
other URL stays proven, since only the URL the phone is asked for differs.

Tests cover the map form on synthetic builds (locate_test.js) and, in
patchd_card_test.js, patchd on a synthetic carplay through card changes,
an install, Remove patch and the Patch button, with a restart where
patchd may restart carplay and none where it may not; the app tells
patchd once the render shows a new choice, or once patchd is back
(test_control.js).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@italomoraes

Copy link
Copy Markdown
Contributor Author

@vijay38454 thanks for the detailed write-up. Rather than a new checkbox, I tied it to the turn card and added it here as a second commit: while the card shows (Below the arrow or At the top), Edit 6's ShowUI asks the phone for the map alone, maps:/car/instrumentcluster/map, which fits Edit 6's 40 bytes. With the card off, everything is as before, Apple Maps' card included. Changing the card reconnects CarPlay where patchd may restart it, as the Patch button does. I tested it on my car with Apple Maps and Google Maps; the description has photos. If you can try it on your G20 with Apple Maps, that would help a lot.

Robert, I also rebased the branch on your main of this evening (cluster-render 0.8.12, waze-on-cluster 0.14.14), with both CHANGELOG entries under Unreleased. The second commit can be reviewed, or left out, on its own.

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