Repository navigation
waze-on-cluster, app: a turn card over the cluster map - #274
italomoraes wants to merge 2 commits into
Conversation
|
@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. 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. 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. I'm happy to test it on my G20 with Apple Maps and send Save logs and photos. |
0eafce5 to
3c955b2
Compare
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>
3c955b2 to
f4a1fa3
Compare
|
@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, 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. |
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_previewdraws 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 itsrelease.json).src/keys.cppdefines every settings key the shipped conf sets, so a new key cannot stop the tool at start:test/keys_test.cpploads 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 formaps:/car/instrumentcluster/mapinstead, 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:minorif 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.handsrc/turn_card.cpp).Tested:
make test-x86(the unit's toolchain in Docker): 669 checks, 0 failed, with the newturn_card_test,route_box_testandkeys_test, and newmap_feed_testcases.make targetbuilds, its 22 imports all exported by the unit's libraries.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 newlocate_testchecks cover the map form.tools/test_control.js54/54,test_page.js,test_profiles.js21/21 andtest_i18n.js(32 locales);release/test/release_test.js18/18;release.js versionsagainst your main passes.route_box_testhas them).patchd_card_testcovers 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):
After, the navigation's manoeuvre at the top and below the arrow:
After, Show an example at the top and 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.
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 at the top ("No topo"), only ours (its road hidden):
🤖 Generated with Claude Code