Skip to content

Commit 52c62b7

Browse files
committed
fix: fix variable type
1 parent a5d92c0 commit 52c62b7

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

frontend/testing-view/src/types/data/telemetryCatalogItem.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,33 @@ export interface Variable {
77
id: string;
88
name: string;
99
type: string;
10+
}
11+
12+
export interface NumericVariable extends Variable {
13+
safeRange: (number | null)[];
14+
warningRange: (number | null)[];
1015
units: string;
1116
}
1217

18+
export interface EnumVariable extends Variable {
19+
options: string[];
20+
}
21+
22+
type BooleanVariable = Variable;
23+
24+
export type TelemetryVariable =
25+
| NumericVariable
26+
| EnumVariable
27+
| BooleanVariable;
28+
1329
/**
1430
* Definition of a telemetry packet as it arrives from the backend.
1531
*/
1632
export interface RawPacket extends Item {
1733
count: number;
1834
cycleTime: number;
1935
type: string;
20-
measurements: Variable[];
36+
measurements: TelemetryVariable[];
2137
/** Currently unused (always equals to "000000" placeholder on the backend) */
2238
hexValue: string;
2339
}

0 commit comments

Comments
 (0)