From 70e0932b80dc3103178af1f5fc19610106d88d60 Mon Sep 17 00:00:00 2001 From: palgabor94 Date: Fri, 2 Oct 2026 13:00:58 +0200 Subject: [PATCH 1/2] feat(dash-apps): turn the adas wheel with the steering angle The lamp widget gets an optional numeric `angle` bind that rotates its icon. The default layout binds the adas wheel to egoSteeringAngle. The glow is dropped on a rotating lamp, where it made the icon jitter. The web demo and the iOS demo mode now steer visibly (iOS cruise wiggle +-3 -> +-15 deg). Co-Authored-By: Claude Sonnet 5.5 --- dash-apps/web-compose/core/demo.js | 1 + dash-apps/web-compose/layouts/default.js | 4 ++-- dash-apps/web-compose/widgets/_generated.css | 4 +++- dash-apps/web-compose/widgets/_generated.js | 17 +++++++++++++---- .../web-compose/widgets/lamp/descriptor.json | 12 ++++++++++++ dash-apps/web-compose/widgets/lamp/widget.css | 4 +++- dash-apps/web-compose/widgets/lamp/widget.js | 15 ++++++++++++--- .../dashpilot/DataSource/DemoDataSource.swift | 4 ++-- 8 files changed, 48 insertions(+), 13 deletions(-) diff --git a/dash-apps/web-compose/core/demo.js b/dash-apps/web-compose/core/demo.js index bde35c8..a9ed6f0 100644 --- a/dash-apps/web-compose/core/demo.js +++ b/dash-apps/web-compose/core/demo.js @@ -26,6 +26,7 @@ fusedSpeedLimit: t % 30 < 15 ? 90 : 130, gear: 4, adasOn: t > 6, + egoSteeringAngle: Math.sin(t * 0.5) * 45, leftBlinker: blinkPhase > 4 && blinkPhase < 7 ? 1 : 0, rightBlinker: blinkPhase > 12 && blinkPhase < 15 ? 1 : 0, leftBlindSpot: blinkPhase > 4.5 && blinkPhase < 6 ? 1 : 0, diff --git a/dash-apps/web-compose/layouts/default.js b/dash-apps/web-compose/layouts/default.js index 223ebbf..9f4ec6c 100644 --- a/dash-apps/web-compose/layouts/default.js +++ b/dash-apps/web-compose/layouts/default.js @@ -23,7 +23,7 @@ { uid: "blinker-right", type: "lamp", x: 7, y: 5, w: 1, h: 1, bind: { value: "rightBlinker" }, props: { icon: "arrow-right", blink: true } }, - { uid: "adas", type: "lamp", x: 8, y: 0, w: 2, h: 2, bind: { value: "adasOn" }, + { uid: "adas", type: "lamp", x: 8, y: 0, w: 2, h: 2, bind: { value: "adasOn", angle: "egoSteeringAngle" }, props: { icon: "wheel", color: "#3b82f6", showLabel: true } }, { uid: "gear", type: "readout", x: 10, y: 0, w: 2, h: 2, bind: { value: "gear" }, props: { align: "center" } }, { uid: "battery", type: "bar", x: 8, y: 2, w: 4, h: 2, bind: { value: "batteryPercent" } }, @@ -41,7 +41,7 @@ props: { showLabel: false } }, { uid: "blinker-left", type: "lamp", x: 0, y: 5, w: 1, h: 1, bind: { value: "leftBlinker" }, props: { icon: "arrow-left", blink: true, showLabel: false } }, - { uid: "adas", type: "lamp", x: 1, y: 5, w: 4, h: 1, bind: { value: "adasOn" }, + { uid: "adas", type: "lamp", x: 1, y: 5, w: 4, h: 1, bind: { value: "adasOn", angle: "egoSteeringAngle" }, props: { icon: "wheel", color: "#3b82f6", showLabel: true } }, { uid: "blinker-right", type: "lamp", x: 5, y: 5, w: 1, h: 1, bind: { value: "rightBlinker" }, props: { icon: "arrow-right", blink: true, showLabel: false } }, diff --git a/dash-apps/web-compose/widgets/_generated.css b/dash-apps/web-compose/widgets/_generated.css index b170b6e..737adc9 100644 --- a/dash-apps/web-compose/widgets/_generated.css +++ b/dash-apps/web-compose/widgets/_generated.css @@ -75,7 +75,7 @@ width: clamp(16px, 48cqmin, 120px); height: clamp(16px, 48cqmin, 120px); fill: var(--track); - transition: fill 120ms linear, filter 120ms linear; + transition: fill 120ms linear, filter 120ms linear, transform 80ms linear; } .lamp__label { color: var(--text-dim); @@ -91,6 +91,8 @@ fill: var(--lamp-on); filter: drop-shadow(0 0 6px var(--lamp-on)); } +/* A glow re-rasterizes on every rotation step and makes the icon jitter. */ +.w-lamp[data-rotate="1"][data-on="1"] .lamp__icon { filter: none; } .w-lamp[data-on="1"] .lamp__label { color: var(--text); } .w-lamp[data-on="1"][data-blink="1"] .lamp__icon { animation: lamp-blink 0.8s steps(1) infinite; } .w-lamp[data-hide-off="1"][data-on="0"] { visibility: hidden; } diff --git a/dash-apps/web-compose/widgets/_generated.js b/dash-apps/web-compose/widgets/_generated.js index 6258588..6b12eab 100644 --- a/dash-apps/web-compose/widgets/_generated.js +++ b/dash-apps/web-compose/widgets/_generated.js @@ -86,7 +86,7 @@ return create; })()); // --- lamp - register({"type":"lamp","version":1,"renderer":"dom","name":{"en":"Indicator","hu":"Jelzőfény","de":"Kontrollleuchte"},"defaultSize":{"w":2,"h":2},"minSize":{"w":1,"h":1},"binds":[{"key":"value","kinds":["bool"],"name":{"en":"Condition","hu":"Feltétel","de":"Bedingung"},"default":"adasOn"}],"props":[{"key":"label","type":"string","default":"","name":{"en":"Label","hu":"Felirat","de":"Beschriftung"}},{"key":"icon","type":"enum","default":"dot","options":["dot","arrow-left","arrow-right","warning","wheel"],"name":{"en":"Icon","hu":"Ikon","de":"Symbol"}},{"key":"color","type":"color","default":"#22c55e","name":{"en":"Active color","hu":"Aktív szín","de":"Aktive Farbe"}},{"key":"blink","type":"bool","default":false,"name":{"en":"Blink when active","hu":"Villogjon aktívan","de":"Blinken wenn aktiv"}},{"key":"hideWhenOff","type":"bool","default":false,"name":{"en":"Hide when off","hu":"Rejtve, ha nem aktív","de":"Ausblenden wenn aus"}},{"key":"showLabel","type":"bool","default":false,"name":{"en":"Show label","hu":"Felirat mutatása","de":"Beschriftung anzeigen"}}]}, (function () { + register({"type":"lamp","version":1,"renderer":"dom","name":{"en":"Indicator","hu":"Jelzőfény","de":"Kontrollleuchte"},"defaultSize":{"w":2,"h":2},"minSize":{"w":1,"h":1},"binds":[{"key":"value","kinds":["bool"],"name":{"en":"Condition","hu":"Feltétel","de":"Bedingung"},"default":"adasOn"},{"key":"angle","kinds":["number"],"default":null,"name":{"en":"Rotate by","hu":"Forgatás ennyivel","de":"Drehen um"}}],"props":[{"key":"label","type":"string","default":"","name":{"en":"Label","hu":"Felirat","de":"Beschriftung"}},{"key":"icon","type":"enum","default":"dot","options":["dot","arrow-left","arrow-right","warning","wheel"],"name":{"en":"Icon","hu":"Ikon","de":"Symbol"}},{"key":"color","type":"color","default":"#22c55e","name":{"en":"Active color","hu":"Aktív szín","de":"Aktive Farbe"}},{"key":"blink","type":"bool","default":false,"name":{"en":"Blink when active","hu":"Villogjon aktívan","de":"Blinken wenn aktiv"}},{"key":"hideWhenOff","type":"bool","default":false,"name":{"en":"Hide when off","hu":"Rejtve, ha nem aktív","de":"Ausblenden wenn aus"}},{"key":"showLabel","type":"bool","default":false,"name":{"en":"Show label","hu":"Felirat mutatása","de":"Beschriftung anzeigen"}}]}, (function () { // On/off indicator for any bool signal. The whole visual state is one // data-on attribute on the cell body; colors and blinking live in CSS. function create(ctx) { @@ -119,12 +119,21 @@ } let last = "0"; + let lastAngle = 0; return { update(values) { const next = values.value ? "1" : "0"; - if (next === last) return; - last = next; - el.dataset.on = next; + if (next !== last) { + last = next; + el.dataset.on = next; + } + // Optional: turn the icon by a signal (degrees), e.g. the wheel by the steering angle. + if (values.angle !== undefined && !el.dataset.rotate) el.dataset.rotate = "1"; + const angle = values.angle === undefined ? 0 : Math.round(values.angle); + if (angle !== lastAngle) { + lastAngle = angle; + icon.style.transform = angle ? "rotate(" + angle + "deg)" : ""; + } }, }; } diff --git a/dash-apps/web-compose/widgets/lamp/descriptor.json b/dash-apps/web-compose/widgets/lamp/descriptor.json index e579b9e..48c35af 100644 --- a/dash-apps/web-compose/widgets/lamp/descriptor.json +++ b/dash-apps/web-compose/widgets/lamp/descriptor.json @@ -27,6 +27,18 @@ "de": "Bedingung" }, "default": "adasOn" + }, + { + "key": "angle", + "kinds": [ + "number" + ], + "default": null, + "name": { + "en": "Rotate by", + "hu": "Forgatás ennyivel", + "de": "Drehen um" + } } ], "props": [ diff --git a/dash-apps/web-compose/widgets/lamp/widget.css b/dash-apps/web-compose/widgets/lamp/widget.css index c0ee57f..89dd74e 100644 --- a/dash-apps/web-compose/widgets/lamp/widget.css +++ b/dash-apps/web-compose/widgets/lamp/widget.css @@ -10,7 +10,7 @@ width: clamp(16px, 48cqmin, 120px); height: clamp(16px, 48cqmin, 120px); fill: var(--track); - transition: fill 120ms linear, filter 120ms linear; + transition: fill 120ms linear, filter 120ms linear, transform 80ms linear; } .lamp__label { color: var(--text-dim); @@ -26,6 +26,8 @@ fill: var(--lamp-on); filter: drop-shadow(0 0 6px var(--lamp-on)); } +/* A glow re-rasterizes on every rotation step and makes the icon jitter. */ +.w-lamp[data-rotate="1"][data-on="1"] .lamp__icon { filter: none; } .w-lamp[data-on="1"] .lamp__label { color: var(--text); } .w-lamp[data-on="1"][data-blink="1"] .lamp__icon { animation: lamp-blink 0.8s steps(1) infinite; } .w-lamp[data-hide-off="1"][data-on="0"] { visibility: hidden; } diff --git a/dash-apps/web-compose/widgets/lamp/widget.js b/dash-apps/web-compose/widgets/lamp/widget.js index bf0a23e..7d5447b 100644 --- a/dash-apps/web-compose/widgets/lamp/widget.js +++ b/dash-apps/web-compose/widgets/lamp/widget.js @@ -30,12 +30,21 @@ function create(ctx) { } let last = "0"; + let lastAngle = 0; return { update(values) { const next = values.value ? "1" : "0"; - if (next === last) return; - last = next; - el.dataset.on = next; + if (next !== last) { + last = next; + el.dataset.on = next; + } + // Optional: turn the icon by a signal (degrees), e.g. the wheel by the steering angle. + if (values.angle !== undefined && !el.dataset.rotate) el.dataset.rotate = "1"; + const angle = values.angle === undefined ? 0 : Math.round(values.angle); + if (angle !== lastAngle) { + lastAngle = angle; + icon.style.transform = angle ? "rotate(" + angle + "deg)" : ""; + } }, }; } diff --git a/dashpilot-ios/dashpilot/DataSource/DemoDataSource.swift b/dashpilot-ios/dashpilot/DataSource/DemoDataSource.swift index f4ea61b..e7b84db 100644 --- a/dashpilot-ios/dashpilot/DataSource/DemoDataSource.swift +++ b/dashpilot-ios/dashpilot/DataSource/DemoDataSource.swift @@ -86,7 +86,7 @@ final class DemoDataSource: IDataSource { case .. Date: Fri, 2 Oct 2026 15:11:05 +0200 Subject: [PATCH 2/2] Fixes --- dash-apps/web-compose/core/editor.js | 5 +++-- dash-apps/web-compose/layouts/default.js | 4 ++-- dash-apps/web-compose/widgets/_generated.css | 4 ++-- dash-apps/web-compose/widgets/_generated.js | 19 +++++++++++-------- .../web-compose/widgets/lamp/descriptor.json | 10 +++------- dash-apps/web-compose/widgets/lamp/widget.css | 4 ++-- dash-apps/web-compose/widgets/lamp/widget.js | 17 ++++++++++------- .../dashpilot/DataSource/DemoDataSource.swift | 16 ---------------- 8 files changed, 33 insertions(+), 46 deletions(-) diff --git a/dash-apps/web-compose/core/editor.js b/dash-apps/web-compose/core/editor.js index 2297558..9d0b7c1 100644 --- a/dash-apps/web-compose/core/editor.js +++ b/dash-apps/web-compose/core/editor.js @@ -465,9 +465,10 @@ body.appendChild(field(t("editor.type"), typeControl(item))); - if ((descriptor.binds || []).length) { + const binds = (descriptor.binds || []).filter((bind) => !bind.hidden); + if (binds.length) { body.appendChild(el("h3", "sheet__section", t("editor.shows"))); - for (const bind of descriptor.binds) { + for (const bind of binds) { const label = bind.name ? DC.i18n.localized(bind.name) : t("editor.shows"); body.appendChild(field(label, bindControl(item, bind, refresh))); } diff --git a/dash-apps/web-compose/layouts/default.js b/dash-apps/web-compose/layouts/default.js index 9f4ec6c..223ebbf 100644 --- a/dash-apps/web-compose/layouts/default.js +++ b/dash-apps/web-compose/layouts/default.js @@ -23,7 +23,7 @@ { uid: "blinker-right", type: "lamp", x: 7, y: 5, w: 1, h: 1, bind: { value: "rightBlinker" }, props: { icon: "arrow-right", blink: true } }, - { uid: "adas", type: "lamp", x: 8, y: 0, w: 2, h: 2, bind: { value: "adasOn", angle: "egoSteeringAngle" }, + { uid: "adas", type: "lamp", x: 8, y: 0, w: 2, h: 2, bind: { value: "adasOn" }, props: { icon: "wheel", color: "#3b82f6", showLabel: true } }, { uid: "gear", type: "readout", x: 10, y: 0, w: 2, h: 2, bind: { value: "gear" }, props: { align: "center" } }, { uid: "battery", type: "bar", x: 8, y: 2, w: 4, h: 2, bind: { value: "batteryPercent" } }, @@ -41,7 +41,7 @@ props: { showLabel: false } }, { uid: "blinker-left", type: "lamp", x: 0, y: 5, w: 1, h: 1, bind: { value: "leftBlinker" }, props: { icon: "arrow-left", blink: true, showLabel: false } }, - { uid: "adas", type: "lamp", x: 1, y: 5, w: 4, h: 1, bind: { value: "adasOn", angle: "egoSteeringAngle" }, + { uid: "adas", type: "lamp", x: 1, y: 5, w: 4, h: 1, bind: { value: "adasOn" }, props: { icon: "wheel", color: "#3b82f6", showLabel: true } }, { uid: "blinker-right", type: "lamp", x: 5, y: 5, w: 1, h: 1, bind: { value: "rightBlinker" }, props: { icon: "arrow-right", blink: true, showLabel: false } }, diff --git a/dash-apps/web-compose/widgets/_generated.css b/dash-apps/web-compose/widgets/_generated.css index 737adc9..a76b97c 100644 --- a/dash-apps/web-compose/widgets/_generated.css +++ b/dash-apps/web-compose/widgets/_generated.css @@ -91,8 +91,8 @@ fill: var(--lamp-on); filter: drop-shadow(0 0 6px var(--lamp-on)); } -/* A glow re-rasterizes on every rotation step and makes the icon jitter. */ -.w-lamp[data-rotate="1"][data-on="1"] .lamp__icon { filter: none; } +.w-lamp[data-steer="1"] .lamp__icon { will-change: transform; } +.w-lamp[data-steer="1"][data-on="1"] .lamp__icon { filter: none; } .w-lamp[data-on="1"] .lamp__label { color: var(--text); } .w-lamp[data-on="1"][data-blink="1"] .lamp__icon { animation: lamp-blink 0.8s steps(1) infinite; } .w-lamp[data-hide-off="1"][data-on="0"] { visibility: hidden; } diff --git a/dash-apps/web-compose/widgets/_generated.js b/dash-apps/web-compose/widgets/_generated.js index 6b12eab..6e13cd9 100644 --- a/dash-apps/web-compose/widgets/_generated.js +++ b/dash-apps/web-compose/widgets/_generated.js @@ -86,7 +86,7 @@ return create; })()); // --- lamp - register({"type":"lamp","version":1,"renderer":"dom","name":{"en":"Indicator","hu":"Jelzőfény","de":"Kontrollleuchte"},"defaultSize":{"w":2,"h":2},"minSize":{"w":1,"h":1},"binds":[{"key":"value","kinds":["bool"],"name":{"en":"Condition","hu":"Feltétel","de":"Bedingung"},"default":"adasOn"},{"key":"angle","kinds":["number"],"default":null,"name":{"en":"Rotate by","hu":"Forgatás ennyivel","de":"Drehen um"}}],"props":[{"key":"label","type":"string","default":"","name":{"en":"Label","hu":"Felirat","de":"Beschriftung"}},{"key":"icon","type":"enum","default":"dot","options":["dot","arrow-left","arrow-right","warning","wheel"],"name":{"en":"Icon","hu":"Ikon","de":"Symbol"}},{"key":"color","type":"color","default":"#22c55e","name":{"en":"Active color","hu":"Aktív szín","de":"Aktive Farbe"}},{"key":"blink","type":"bool","default":false,"name":{"en":"Blink when active","hu":"Villogjon aktívan","de":"Blinken wenn aktiv"}},{"key":"hideWhenOff","type":"bool","default":false,"name":{"en":"Hide when off","hu":"Rejtve, ha nem aktív","de":"Ausblenden wenn aus"}},{"key":"showLabel","type":"bool","default":false,"name":{"en":"Show label","hu":"Felirat mutatása","de":"Beschriftung anzeigen"}}]}, (function () { + register({"type":"lamp","version":1,"renderer":"dom","name":{"en":"Indicator","hu":"Jelzőfény","de":"Kontrollleuchte"},"defaultSize":{"w":2,"h":2},"minSize":{"w":1,"h":1},"binds":[{"key":"value","kinds":["bool"],"name":{"en":"Condition","hu":"Feltétel","de":"Bedingung"},"default":"adasOn"},{"key":"steering","kinds":["number"],"default":"egoSteeringAngle","hidden":true}],"props":[{"key":"label","type":"string","default":"","name":{"en":"Label","hu":"Felirat","de":"Beschriftung"}},{"key":"icon","type":"enum","default":"dot","options":["dot","arrow-left","arrow-right","warning","wheel"],"name":{"en":"Icon","hu":"Ikon","de":"Symbol"}},{"key":"color","type":"color","default":"#22c55e","name":{"en":"Active color","hu":"Aktív szín","de":"Aktive Farbe"}},{"key":"blink","type":"bool","default":false,"name":{"en":"Blink when active","hu":"Villogjon aktívan","de":"Blinken wenn aktiv"}},{"key":"hideWhenOff","type":"bool","default":false,"name":{"en":"Hide when off","hu":"Rejtve, ha nem aktív","de":"Ausblenden wenn aus"}},{"key":"showLabel","type":"bool","default":false,"name":{"en":"Show label","hu":"Felirat mutatása","de":"Beschriftung anzeigen"}}]}, (function () { // On/off indicator for any bool signal. The whole visual state is one // data-on attribute on the cell body; colors and blinking live in CSS. function create(ctx) { @@ -118,6 +118,11 @@ el.appendChild(label); } + const steers = props.icon === "wheel"; + if (steers) { + el.dataset.steer = "1"; + icon.style.transform = "rotate(0deg)"; + } let last = "0"; let lastAngle = 0; return { @@ -127,13 +132,11 @@ last = next; el.dataset.on = next; } - // Optional: turn the icon by a signal (degrees), e.g. the wheel by the steering angle. - if (values.angle !== undefined && !el.dataset.rotate) el.dataset.rotate = "1"; - const angle = values.angle === undefined ? 0 : Math.round(values.angle); - if (angle !== lastAngle) { - lastAngle = angle; - icon.style.transform = angle ? "rotate(" + angle + "deg)" : ""; - } + if (!steers) return; + const angle = values.steering === undefined ? 0 : Math.round(values.steering); + if (angle === lastAngle) return; + lastAngle = angle; + icon.style.transform = "rotate(" + angle + "deg)"; }, }; } diff --git a/dash-apps/web-compose/widgets/lamp/descriptor.json b/dash-apps/web-compose/widgets/lamp/descriptor.json index 48c35af..115e4e8 100644 --- a/dash-apps/web-compose/widgets/lamp/descriptor.json +++ b/dash-apps/web-compose/widgets/lamp/descriptor.json @@ -29,16 +29,12 @@ "default": "adasOn" }, { - "key": "angle", + "key": "steering", "kinds": [ "number" ], - "default": null, - "name": { - "en": "Rotate by", - "hu": "Forgatás ennyivel", - "de": "Drehen um" - } + "default": "egoSteeringAngle", + "hidden": true } ], "props": [ diff --git a/dash-apps/web-compose/widgets/lamp/widget.css b/dash-apps/web-compose/widgets/lamp/widget.css index 89dd74e..d93851a 100644 --- a/dash-apps/web-compose/widgets/lamp/widget.css +++ b/dash-apps/web-compose/widgets/lamp/widget.css @@ -26,8 +26,8 @@ fill: var(--lamp-on); filter: drop-shadow(0 0 6px var(--lamp-on)); } -/* A glow re-rasterizes on every rotation step and makes the icon jitter. */ -.w-lamp[data-rotate="1"][data-on="1"] .lamp__icon { filter: none; } +.w-lamp[data-steer="1"] .lamp__icon { will-change: transform; } +.w-lamp[data-steer="1"][data-on="1"] .lamp__icon { filter: none; } .w-lamp[data-on="1"] .lamp__label { color: var(--text); } .w-lamp[data-on="1"][data-blink="1"] .lamp__icon { animation: lamp-blink 0.8s steps(1) infinite; } .w-lamp[data-hide-off="1"][data-on="0"] { visibility: hidden; } diff --git a/dash-apps/web-compose/widgets/lamp/widget.js b/dash-apps/web-compose/widgets/lamp/widget.js index 7d5447b..1978753 100644 --- a/dash-apps/web-compose/widgets/lamp/widget.js +++ b/dash-apps/web-compose/widgets/lamp/widget.js @@ -29,6 +29,11 @@ function create(ctx) { el.appendChild(label); } + const steers = props.icon === "wheel"; + if (steers) { + el.dataset.steer = "1"; + icon.style.transform = "rotate(0deg)"; + } let last = "0"; let lastAngle = 0; return { @@ -38,13 +43,11 @@ function create(ctx) { last = next; el.dataset.on = next; } - // Optional: turn the icon by a signal (degrees), e.g. the wheel by the steering angle. - if (values.angle !== undefined && !el.dataset.rotate) el.dataset.rotate = "1"; - const angle = values.angle === undefined ? 0 : Math.round(values.angle); - if (angle !== lastAngle) { - lastAngle = angle; - icon.style.transform = angle ? "rotate(" + angle + "deg)" : ""; - } + if (!steers) return; + const angle = values.steering === undefined ? 0 : Math.round(values.steering); + if (angle === lastAngle) return; + lastAngle = angle; + icon.style.transform = "rotate(" + angle + "deg)"; }, }; } diff --git a/dashpilot-ios/dashpilot/DataSource/DemoDataSource.swift b/dashpilot-ios/dashpilot/DataSource/DemoDataSource.swift index e7b84db..b495d64 100644 --- a/dashpilot-ios/dashpilot/DataSource/DemoDataSource.swift +++ b/dashpilot-ios/dashpilot/DataSource/DemoDataSource.swift @@ -50,12 +50,6 @@ final class DemoDataSource: IDataSource { private static let goEnd: TimeInterval = 78 // cycleLength is the end of the accelerate-back-to-cruise phase. - #if DEBUG - private static let parked = true - #else - private static let parked = false - #endif - /// Slowly drifting base speed, continuous across cycle boundaries so /// cruise phases never jump. private static func cruiseSpeed(at t: TimeInterval) -> Float { @@ -145,16 +139,6 @@ final class DemoDataSource: IDataSource { s.stopLineDist = 0 } - if parked { - s.gear = 1 // Park - s.egoSpeed = 0 - s.egoSteeringAngle = 0 - s.leftBlinker = 0 - s.rightBlinker = 0 - s.trafficLightColor = 0 - s.stopLineDist = 0 - } - s.accSetSpeed = cruiseSpeed(at: t) + 5 s.leftBlindSpot = t.truncatingRemainder(dividingBy: 23) < 3 ? 1 : 0