Dashboard overlay (Overlays → Live → Dashboard): one inclinometer (compass ring, roll and pitch), speed, the speed limit with an over-limit warning and, on the route, the next limit change, traffic signal, maneuver and its lanes; /api/route gains speed_limits, signals and lanes, POST /api/road gives the driven road's limit; GNSS simulation (random trips over Valhalla) for trying it without the car; the HMC5883L heading in can.json
CI / check (push) Successful in 24s
CI / deploy (push) Successful in 17s

This commit is contained in:
randy committed 2026-11-30 18:30:21 +01:00
1 parent 5958ffd153
commit 190a8ad334
13 files changed
+713 -27

No files matched your search

+63
View File
@@ -3284,3 +3284,66 @@ html.night .maplibregl-marker {
.gpx-panel__action[hidden] {
display: none;
}
/* The car's dashboard over the map (public/js/dashboard.js). */
.dash-card {
position: absolute;
right: 12px;
bottom: 36px;
z-index: 3;
padding: 8px;
border-radius: 12px;
background: #fff;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
text-align: center;
pointer-events: none;
}
.dash-incl {
display: block;
width: 190px;
height: 190px;
font-family: system-ui, sans-serif;
}
.dash-incl text { text-anchor: middle; dominant-baseline: middle; fill: #222; }
.dash-face { fill: #f6f6f4; stroke: #bbb; stroke-width: 2; }
.dash-ring line { stroke: #555; stroke-width: 2; }
.dash-ring text { font-size: 14px; font-weight: 600; }
.dash-ring .dash-n { fill: #c62828; }
.dash-lubber { fill: #c62828; }
.dash-heading { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-ground { stroke: #999; stroke-width: 1.5; stroke-dasharray: 3 3; }
.dash-car { fill: #37474f; }
.dash-wheel { fill: #111; }
.dash-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-caption { font-size: 10px; fill: #777 !important; text-transform: uppercase; letter-spacing: 0.05em; }
.dash-incl .dash-warn { fill: #ef6c00; }
.dash-incl .dash-bad { fill: #c62828; }
.dash-speed { font-size: 14px; color: #555; }
.dash-speed span { font-size: 34px; font-weight: 700; color: #222; font-variant-numeric: tabular-nums; }
/* Navigation on the dashboard: the speed limit sign and what's ahead. */
.dash-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; text-align: left; font-size: 13px; color: #333; }
.dash-limit {
display: inline-flex; align-items: center; justify-content: center; flex: none;
width: 56px; height: 56px; box-sizing: border-box; border: 7px solid #d32f2f; border-radius: 50%;
background: #fff; color: #111; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.dash-limit[hidden] { display: none; }
.dash-limit--small { width: 26px; height: 26px; border-width: 3px; font-size: 11px; vertical-align: middle; }
/* no limit (Autobahn): the white sign with the black slash */
.dash-limit--none { border: 2px solid #111; background: linear-gradient(135deg, transparent 45%, #111 45% 55%, transparent 55%), #fff; }
.dash-ahead > div { margin: 2px 0; white-space: nowrap; }
.dash-maneuver { max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.dash-signal {
display: inline-block; width: 8px; height: 20px; vertical-align: middle; border-radius: 3px; background:
radial-gradient(circle at 50% 17%, #e53935 2.5px, transparent 3px), radial-gradient(circle at 50% 50%, #fbc02d 2.5px, transparent 3px),
radial-gradient(circle at 50% 83%, #43a047 2.5px, transparent 3px), #222;
}
.dash-lanes { display: flex; gap: 3px; }
.dash-lanes span { min-width: 22px; padding: 1px 3px; border-radius: 4px; background: #eee; color: #999; text-align: center; font-size: 16px; }
.dash-lanes .dash-lane--go { background: #1d6fdc; color: #fff; }
.dash-card--over { box-shadow: 0 0 0 4px #d32f2f, 0 1px 6px rgba(0, 0, 0, 0.25); }
.dash-card--over .dash-speed span { color: #d32f2f; }