Skip to content

Commit 73b861a

Browse files
committed
Rename to ECVM
1 parent a44ca6a commit 73b861a

15 files changed

Lines changed: 70 additions & 69 deletions

pecan/src/assets/wcars.css

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* pecan/src/assets/wcars.css
2-
* Airbus ECAM / E-WD display styling.
2+
* Vehicle (WFR25) ECVM / E-WD display styling.
33
* Colour philosophy: red = WARNING, amber = CAUTION, green = MEMO/normal,
44
* cyan = action/value, white = remark. Pure phosphor colours on near-black DU.
55
*/
66
:root {
77
--wcars-bg: #060606;
88
--wcars-du: #000;
99
--wcars-red: #ff2424;
10-
--wcars-amber: #ff9b1a; /* ECAM caution amber leans orange, not yellow */
10+
--wcars-amber: #ff9b1a; /* ECVM caution amber leans orange, not yellow */
1111
--wcars-green: #1fe33a; /* pure phosphor green, not mint */
1212
--wcars-cyan: #25d4ff;
1313
--wcars-white: #e9ecec;
@@ -85,7 +85,7 @@
8585
}
8686

8787
/* Each pane is a physical Display Unit: dark bezel + inset black screen + glow */
88-
.wcars-ecam,
88+
.wcars-ecvm,
8989
.wcars-acars {
9090
background: var(--wcars-du);
9191
border: 1px solid var(--wcars-bezel);
@@ -104,19 +104,19 @@
104104
}
105105

106106
/* EWD warning area: scrollable alert list + fixed grey-stripe footer */
107-
.wcars-ecam {
107+
.wcars-ecvm {
108108
display: flex;
109109
flex-direction: column;
110110
overflow: hidden;
111111
}
112-
.wcars-ecam-scroll {
112+
.wcars-ecvm-scroll {
113113
flex: 1 1 auto;
114114
overflow-y: auto;
115115
padding: 0.85rem 0.9rem;
116116
}
117117

118-
/* ---- ECAM active-alert rows ---- */
119-
.wcars-ecam-row {
118+
/* ---- ECVM active-alert rows ---- */
119+
.wcars-ecvm-row {
120120
display: grid;
121121
grid-template-columns: 3.2rem 1fr 1.5rem;
122122
grid-template-rows: auto auto;
@@ -149,19 +149,19 @@
149149
letter-spacing: 0.06em;
150150
text-shadow: 0 0 4px currentColor;
151151
}
152-
.wcars-ecam-row .wcars-title { justify-self: start; }
152+
.wcars-ecvm-row .wcars-title { justify-self: start; }
153153

154-
.wcars-ecam-row.wcars-warning .wcars-title {
154+
.wcars-ecvm-row.wcars-warning .wcars-title {
155155
border: 1px solid currentColor;
156156
padding: 0.04rem 0.42rem;
157157
box-shadow: 0 0 6px rgba(255, 36, 36, 0.35);
158158
}
159-
.wcars-ecam-row.wcars-caution .wcars-title {
159+
.wcars-ecvm-row.wcars-caution .wcars-title {
160160
text-decoration: underline;
161161
text-decoration-thickness: 1px;
162162
text-underline-offset: 3px;
163163
}
164-
.wcars-ecam-row.wcars-memo .wcars-title { text-decoration: none; }
164+
.wcars-ecvm-row.wcars-memo .wcars-title { text-decoration: none; }
165165

166166
/* corrective/remark line: indented under the title, dimmer white remark */
167167
.wcars-detail {
@@ -175,7 +175,7 @@
175175
text-shadow: none;
176176
}
177177

178-
/* ECAM dot-leader action line: REMARK ········· VALUE(cyan) */
178+
/* ECVM dot-leader action line: REMARK ········· VALUE(cyan) */
179179
.wcars-leader {
180180
display: flex;
181181
align-items: baseline;
@@ -236,12 +236,12 @@
236236
.wcars-green { color: var(--wcars-green); }
237237

238238
/* "WCARS NORMAL" green memo when nothing is active */
239-
.wcars-ecam--empty {
239+
.wcars-ecvm--empty {
240240
display: flex;
241241
align-items: center;
242242
justify-content: center;
243243
}
244-
.wcars-ecam--empty .wcars-green {
244+
.wcars-ecvm--empty .wcars-green {
245245
font-size: 1.15rem;
246246
font-weight: 700;
247247
letter-spacing: 0.3em;
@@ -432,16 +432,16 @@
432432
.wcars-settings-actions button:hover { background: var(--wcars-cyan); color: #000; }
433433

434434
/* ---- Display-unit scrollbars ---- */
435-
.wcars-ecam-scroll::-webkit-scrollbar,
435+
.wcars-ecvm-scroll::-webkit-scrollbar,
436436
.wcars-acars::-webkit-scrollbar { width: 8px; }
437-
.wcars-ecam-scroll::-webkit-scrollbar-track,
437+
.wcars-ecvm-scroll::-webkit-scrollbar-track,
438438
.wcars-acars::-webkit-scrollbar-track { background: #050505; }
439-
.wcars-ecam-scroll::-webkit-scrollbar-thumb,
439+
.wcars-ecvm-scroll::-webkit-scrollbar-thumb,
440440
.wcars-acars::-webkit-scrollbar-thumb {
441441
background: var(--wcars-bezel);
442442
border-radius: 0;
443443
}
444-
.wcars-ecam-scroll::-webkit-scrollbar-thumb:hover,
444+
.wcars-ecvm-scroll::-webkit-scrollbar-thumb:hover,
445445
.wcars-acars::-webkit-scrollbar-thumb:hover { background: #2a3236; }
446446

447447
@media (prefers-reduced-motion: reduce) {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from "react";
22
import { useWcars } from "../../context/WcarsContext";
33
import { SEVERITY_LABEL, splitLeader } from "../../lib/wcars/ewdFormat";
44

5-
export function EcamPanel() {
5+
export function EcvMPanel() {
66
const { alerts, clear, clearAll } = useWcars();
77
const scrollRef = useRef<HTMLDivElement>(null);
88
const [overflow, setOverflow] = useState(false);
@@ -20,19 +20,19 @@ export function EcamPanel() {
2020

2121
if (alerts.length === 0) {
2222
return (
23-
<div className="wcars-ecam wcars-ecam--empty" data-testid="ecam-empty">
23+
<div className="wcars-ecvm wcars-ecvm--empty" data-testid="ecvm-empty">
2424
<span className="wcars-green">WCARS NORMAL</span>
2525
</div>
2626
);
2727
}
2828

2929
return (
30-
<div className="wcars-ecam" data-testid="ecam">
31-
<div className="wcars-ecam-scroll" ref={scrollRef}>
30+
<div className="wcars-ecvm" data-testid="ecvm">
31+
<div className="wcars-ecvm-scroll" ref={scrollRef}>
3232
{alerts.map((a) => {
3333
const { label, value } = splitLeader(a.detail);
3434
return (
35-
<div key={a.id} className={`wcars-ecam-row wcars-${a.severity.toLowerCase()}`}>
35+
<div key={a.id} className={`wcars-ecvm-row wcars-${a.severity.toLowerCase()}`}>
3636
<span className="wcars-sev">{SEVERITY_LABEL[a.severity]}</span>
3737
<span className="wcars-title">{a.title}</span>
3838
<button

pecan/src/components/wcars/sd/CoolSynoptic.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useSdValue } from "../../../lib/wcars/sdSignals";
2-
import { EcamValueBox } from "./primitives/EcamValueBox";
2+
import { EcvMValueBox } from "./primitives/EcvMValueBox";
33

44
export function CoolSynoptic() {
55
const coolant = useSdValue("coolant");
@@ -11,13 +11,13 @@ export function CoolSynoptic() {
1111
return (
1212
<div className="wcars-syn wcars-syn-cool" data-testid="syn-cool">
1313
<div className="wcars-syn-title">COOL / THERMAL</div>
14-
<EcamValueBox label="COOLANT" value={coolant.value} unit="°C" status={coolant.status} decimals={1} />
14+
<EcvMValueBox label="COOLANT" value={coolant.value} unit="°C" status={coolant.status} decimals={1} />
1515
<div className="wcars-cool-grid">
16-
<EcamValueBox label="MOTOR" value={motor.value} unit="°C" status={motor.status} decimals={1} />
17-
<EcamValueBox label="MOD A" value={modA.value} unit="°C" status={modA.status} decimals={1} />
18-
<EcamValueBox label="MOD B" value={modB.value} unit="°C" status={modB.status} decimals={1} />
19-
<EcamValueBox label="MOD C" value={modC.value} unit="°C" status={modC.status} decimals={1} />
20-
<EcamValueBox label="GATE" value={gate.value} unit="°C" status={gate.status} decimals={1} />
16+
<EcvMValueBox label="MOTOR" value={motor.value} unit="°C" status={motor.status} decimals={1} />
17+
<EcvMValueBox label="MOD A" value={modA.value} unit="°C" status={modA.status} decimals={1} />
18+
<EcvMValueBox label="MOD B" value={modB.value} unit="°C" status={modB.status} decimals={1} />
19+
<EcvMValueBox label="MOD C" value={modC.value} unit="°C" status={modC.status} decimals={1} />
20+
<EcvMValueBox label="GATE" value={gate.value} unit="°C" status={gate.status} decimals={1} />
2121
</div>
2222
</div>
2323
);

pecan/src/components/wcars/sd/ElecSchematic.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function Readout({
4747
export function ElecSchematic() {
4848
const pack = usePackAggregates();
4949
// Synthetic SdValue for the computed pack voltage, so the existing
50-
// EcamValueBox status logic still works.
50+
// EcvMValueBox status logic still works.
5151
const packVsd: SdValue = {
5252
value: pack.cellCount > 0 ? pack.packVoltage : null,
5353
label: "",

pecan/src/components/wcars/sd/MotorSynoptic.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useSdValue } from "../../../lib/wcars/sdSignals";
2-
import { EcamGauge } from "./primitives/EcamGauge";
3-
import { EcamValueBox } from "./primitives/EcamValueBox";
2+
import { EcvMGauge } from "./primitives/EcvMGauge";
3+
import { EcvMValueBox } from "./primitives/EcvMValueBox";
44

55
export function MotorSynoptic() {
66
const rpm = useSdValue("motorRpm");
@@ -12,15 +12,15 @@ export function MotorSynoptic() {
1212
return (
1313
<div className="wcars-syn wcars-syn-motor" data-testid="syn-motor">
1414
<div className="wcars-syn-title">MOTOR / DRIVE</div>
15-
<EcamGauge label="N" value={rpm.value} range={[0, 6000]} unit="RPM" status={rpm.status} />
15+
<EcvMGauge label="N" value={rpm.value} range={[0, 6000]} unit="RPM" status={rpm.status} />
1616
<div className="wcars-motor-torque">
17-
<EcamValueBox label="TQ CMD" value={tCmd.value} unit="Nm" status={tCmd.status} decimals={1} />
18-
<EcamValueBox label="TQ FB" value={tFb.value} unit="Nm" status={tFb.status} decimals={1} />
17+
<EcvMValueBox label="TQ CMD" value={tCmd.value} unit="Nm" status={tCmd.status} decimals={1} />
18+
<EcvMValueBox label="TQ FB" value={tFb.value} unit="Nm" status={tFb.status} decimals={1} />
1919
</div>
2020
<div className="wcars-motor-temps">
21-
<EcamValueBox label="MOT" value={mt.value} unit="°C" status={mt.status} decimals={1} />
22-
<EcamValueBox label="HOT" value={hs.value} unit="°C" status={hs.status} decimals={1} />
23-
<EcamValueBox label="GATE" value={gd.value} unit="°C" status={gd.status} decimals={1} />
21+
<EcvMValueBox label="MOT" value={mt.value} unit="°C" status={mt.status} decimals={1} />
22+
<EcvMValueBox label="HOT" value={hs.value} unit="°C" status={hs.status} decimals={1} />
23+
<EcvMValueBox label="GATE" value={gd.value} unit="°C" status={gd.status} decimals={1} />
2424
</div>
2525
</div>
2626
);

pecan/src/components/wcars/sd/WheelSynoptic.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useSdValue } from "../../../lib/wcars/sdSignals";
2-
import { EcamValueBox } from "./primitives/EcamValueBox";
2+
import { EcvMValueBox } from "./primitives/EcvMValueBox";
33

44
export function WheelSynoptic() {
55
const lf = useSdValue("leftRpm");
@@ -12,14 +12,14 @@ export function WheelSynoptic() {
1212
<div className="wcars-syn wcars-syn-wheel" data-testid="syn-wheel">
1313
<div className="wcars-syn-title">WHEEL</div>
1414
<div className="wcars-wheel-grid">
15-
<EcamValueBox label="L RPM" value={lf.value} unit="" status={lf.status} />
16-
<EcamValueBox label="R RPM" value={rf.value} unit="" status={rf.status} />
17-
<EcamValueBox label="BRK F" value={bf.value} unit="" status={bf.status} decimals={2} />
18-
<EcamValueBox label="BRK R" value={br.value} unit="" status={br.status} decimals={2} />
15+
<EcvMValueBox label="L RPM" value={lf.value} unit="" status={lf.status} />
16+
<EcvMValueBox label="R RPM" value={rf.value} unit="" status={rf.status} />
17+
<EcvMValueBox label="BRK F" value={bf.value} unit="" status={bf.status} decimals={2} />
18+
<EcvMValueBox label="BRK R" value={br.value} unit="" status={br.status} decimals={2} />
1919
</div>
2020
<div className="wcars-wheel-inputs">
21-
<EcamValueBox label="THR" value={thr.value} unit="%" status={thr.status} />
22-
<EcamValueBox label="BRK" value={brk.value} unit="%" status={brk.status} />
21+
<EcvMValueBox label="THR" value={thr.value} unit="%" status={thr.status} />
22+
<EcvMValueBox label="BRK" value={brk.value} unit="%" status={brk.status} />
2323
</div>
2424
</div>
2525
);

pecan/src/components/wcars/sd/primitives/EcamFlowLine.tsx renamed to pecan/src/components/wcars/sd/primitives/EcvMFlowLine.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ interface Props {
33
active?: boolean;
44
}
55

6-
export function EcamFlowLine({ x1, y1, x2, y2, active = false }: Props) {
6+
export function EcvMFlowLine({ x1, y1, x2, y2, active = false }: Props) {
77
return (
88
<line
99
className={`wcars-flow${active ? " wcars-flow--active" : ""}`}

pecan/src/components/wcars/sd/primitives/EcamGauge.test.tsx renamed to pecan/src/components/wcars/sd/primitives/EcvMGauge.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { render, screen } from "@testing-library/react";
22
import { describe, it, expect } from "vitest";
3-
import { EcamGauge } from "./EcamGauge";
3+
import { EcvMGauge } from "./EcvMGauge";
44

5-
describe("EcamGauge", () => {
5+
describe("EcvMGauge", () => {
66
it("renders an svg with the digital readout", () => {
77
const { container } = render(
8-
<EcamGauge label="N" value={3000} range={[0, 6000]} unit="RPM" status="normal" />,
8+
<EcvMGauge label="N" value={3000} range={[0, 6000]} unit="RPM" status="normal" />,
99
);
1010
expect(container.querySelector("svg")).toBeTruthy();
1111
expect(screen.getByText("3000")).toBeTruthy();
1212
expect(screen.getByText("RPM")).toBeTruthy();
1313
});
1414
it("shows XX when missing", () => {
15-
render(<EcamGauge label="N" value={null} range={[0, 6000]} unit="RPM" status="missing" />);
15+
render(<EcvMGauge label="N" value={null} range={[0, 6000]} unit="RPM" status="missing" />);
1616
expect(screen.getByText("XX")).toBeTruthy();
1717
});
1818
});

pecan/src/components/wcars/sd/primitives/EcamGauge.tsx renamed to pecan/src/components/wcars/sd/primitives/EcvMGauge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function arcPath(startDeg: number, endDeg: number, r: number) {
2626
return `M ${s.x} ${s.y} A ${r} ${r} 0 ${large} 1 ${e.x} ${e.y}`;
2727
}
2828

29-
export function EcamGauge({
29+
export function EcvMGauge({
3030
label, value, range, unit, status, decimals = 0, sweepDeg = 240,
3131
}: Props) {
3232
const [min, max] = range;

pecan/src/components/wcars/sd/primitives/EcamLabel.tsx renamed to pecan/src/components/wcars/sd/primitives/EcvMLabel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import type { ReactNode } from "react";
22

33
type Role = "title" | "remark" | "value" | "unit";
44

5-
export function EcamLabel({ role, children }: { role: Role; children: ReactNode }) {
5+
export function EcvMLabel({ role, children }: { role: Role; children: ReactNode }) {
66
return <span className={`wcars-lbl wcars-lbl--${role}`}>{children}</span>;
77
}

0 commit comments

Comments
 (0)