Nodes describe themselves: an SDO client (Can::Sdo) reads each esphome-canopen node's TPDOs and entities (type, name, unit, range) on its first heartbeat, cached by the TPDO layout hash, decoded with no hand-written signals — can.json keeps aliases (with unit conversion) and foreign devices; design doc (NPS planning, cockpit instruments, Unigrid band) with color tokens, the dashboard in cockpit colors; starting the simulation turns the GNSS follow on, the GNSS position an arrow by its course
This commit is contained in:
1 parent
ce290f2162
commit
e92f01db12
12 files changed
+713
-76
No files matched your search
+49
-32
@@ -3,6 +3,16 @@
|
||||
:root {
|
||||
--accent: #546619;
|
||||
--accent-bg: #e1e5cf;
|
||||
/* The Unigrid black band (topbar) — also the instruments' bezel. */
|
||||
--band: #1a1a1a;
|
||||
/* Instruments (the driving view), one meaning per color — docs/design.adoc. */
|
||||
--inst-text: #f2f2f2;
|
||||
--inst-muted: #9aa0a6;
|
||||
--inst-ok: #3ccf4e;
|
||||
--inst-caution: #ffb300;
|
||||
--inst-warning: #ff3b30;
|
||||
--inst-active: #e040fb; /* magenta: the route / waypoint / lane being followed */
|
||||
--inst-selected: #00d5ff; /* cyan: a value set by hand */
|
||||
}
|
||||
|
||||
html, body {
|
||||
@@ -35,7 +45,7 @@ html, body {
|
||||
align-items: center;
|
||||
height: 44px;
|
||||
padding: 0 16px;
|
||||
background: #1a1a1a;
|
||||
background: var(--band);
|
||||
}
|
||||
|
||||
.topbar__brand {
|
||||
@@ -3192,6 +3202,7 @@ html.night {
|
||||
}
|
||||
|
||||
html.night .topbar,
|
||||
html.night .dash-card,
|
||||
html.night img,
|
||||
html.night #map canvas,
|
||||
html.night .maplibregl-marker {
|
||||
@@ -3299,7 +3310,9 @@ html.night .maplibregl-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* The car's dashboard over the map (public/js/dashboard.js). */
|
||||
/* The car's dashboard over the map (public/js/dashboard.js), in the
|
||||
cockpit style (docs/design.adoc): the black band as a see-through bezel,
|
||||
light values, colors only for meaning. */
|
||||
.dash-card {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
@@ -3307,65 +3320,69 @@ html.night .maplibregl-marker {
|
||||
z-index: 3;
|
||||
padding: 8px;
|
||||
border-radius: 12px;
|
||||
background: rgb(255 255 255 / var(--dash-alpha, 0.45));
|
||||
background: rgb(26 26 26 / var(--dash-alpha, 0.45));
|
||||
backdrop-filter: blur(2px);
|
||||
box-shadow: 0 1px 6px rgb(0 0 0 / calc(var(--dash-alpha, 0.45) * 0.5));
|
||||
box-shadow: 0 1px 6px rgb(0 0 0 / calc(var(--dash-alpha, 0.45) * 0.6));
|
||||
color: var(--inst-text);
|
||||
text-align: center;
|
||||
pointer-events: none;
|
||||
/* readable over the map whatever the background */
|
||||
text-shadow: 0 0 3px #fff, 0 0 3px #fff;
|
||||
/* readable over a light map whatever the bezel's opacity */
|
||||
text-shadow: 0 0 3px #000, 0 0 3px #000;
|
||||
font-family: system-ui, sans-serif;
|
||||
}
|
||||
|
||||
.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: rgb(246 246 244 / var(--dash-alpha, 0.45)); stroke: #999; stroke-width: 2; }
|
||||
.dash-incl text { paint-order: stroke; stroke: #fff; stroke-width: 3px; }
|
||||
.dash-ring line { stroke: #555; stroke-width: 2; }
|
||||
.dash-incl text { text-anchor: middle; dominant-baseline: middle; fill: var(--inst-text); paint-order: stroke; stroke: #000; stroke-width: 3px; }
|
||||
.dash-face { fill: rgb(0 0 0 / calc(var(--dash-alpha, 0.45) * 0.5)); stroke: var(--inst-muted); stroke-width: 2; }
|
||||
.dash-ring line { stroke: var(--inst-muted); stroke-width: 2; }
|
||||
.dash-ring text { font-size: 14px; font-weight: 600; }
|
||||
.dash-ring .dash-n { fill: #c62828; }
|
||||
.dash-lubber { fill: #c62828; }
|
||||
.dash-ring .dash-n { fill: var(--inst-warning); }
|
||||
.dash-lubber { fill: var(--inst-active); }
|
||||
.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-ground { stroke: var(--inst-muted); stroke-width: 1.5; stroke-dasharray: 3 3; }
|
||||
.dash-car { fill: var(--inst-text); }
|
||||
.dash-wheel { fill: var(--inst-muted); }
|
||||
.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-caption { font-size: 10px; fill: var(--inst-muted) !important; text-transform: uppercase; letter-spacing: 0.05em; }
|
||||
.dash-incl .dash-warn { fill: var(--inst-caution); }
|
||||
.dash-incl .dash-bad { fill: var(--inst-warning); }
|
||||
|
||||
.dash-speed { font-size: 14px; color: #555; }
|
||||
.dash-speed span { font-size: 34px; font-weight: 700; color: #222; font-variant-numeric: tabular-nums; }
|
||||
.dash-speed { font-size: 12px; color: var(--inst-muted); text-transform: uppercase; letter-spacing: 0.05em; }
|
||||
.dash-speed span { font-size: 34px; font-weight: 700; color: var(--inst-text); font-variant-numeric: tabular-nums; letter-spacing: 0; }
|
||||
|
||||
/* 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-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; text-align: left; font-size: 13px; }
|
||||
/* a road sign stays a road sign: white disc, red ring, black figures */
|
||||
.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;
|
||||
background: #fff; color: #111; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: none;
|
||||
}
|
||||
.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-maneuver { max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--inst-active); }
|
||||
.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-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; }
|
||||
.dash-lanes svg.dash-lane { width: 26px; height: 34px; border-radius: 4px; background: #eee; }
|
||||
.dash-lane__arrow { fill: none; stroke: #aaa; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.dash-lane--go { background: #1d6fdc !important; }
|
||||
.dash-lane--go .dash-lane__arrow { stroke: #cfe0f7; }
|
||||
.dash-lane--go .dash-lane__take { stroke: #fff; stroke-width: 3; }
|
||||
.dash-offroute { color: #c62828; font-weight: 600; }
|
||||
.dash-card--over { box-shadow: 0 0 0 4px var(--inst-warning), 0 1px 6px rgba(0, 0, 0, 0.25); }
|
||||
.dash-card--over .dash-speed span { color: var(--inst-warning); }
|
||||
.dash-lanes svg.dash-lane { width: 26px; height: 34px; border-radius: 4px; background: rgb(0 0 0 / 0.45); border: 1px solid var(--inst-muted); box-sizing: border-box; }
|
||||
.dash-lane__arrow { fill: none; stroke: var(--inst-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.dash-lane--go { border-color: var(--inst-active) !important; }
|
||||
.dash-lane--go .dash-lane__arrow { stroke: var(--inst-text); }
|
||||
.dash-lane--go .dash-lane__take { stroke: var(--inst-active); stroke-width: 3; }
|
||||
.dash-offroute { color: var(--inst-caution); font-weight: 600; }
|
||||
/* The GNSS position once it has a course: an arrow, not the dot. */
|
||||
.gnss-marker--arrow { width: 26px; height: 26px; border: none; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 1px 2px rgb(0 0 0 / 0.5)); }
|
||||
.gnss-marker--arrow svg { display: block; }
|
||||
Reference in new issue
Block a user