31 lines
2.2 KiB
Markdown
31 lines
2.2 KiB
Markdown
# Vehicle status prototype
|
||
|
||
Run `scenes/vehicle_status_demo.tscn` with F6. The controls switch between normal, warning, fault, and a stopped feed, plus high contrast and alert pulsing.
|
||
|
||
Instance `components/vehicle_status_panel.tscn` for integration:
|
||
|
||
```gdscript
|
||
$VehicleStatusPanel.set_status("STATIONKEEP", 0, "", "Position hold active", "Thrusters enabled")
|
||
$VehicleStatusPanel.set_telemetry(48.0, 18.2, 874.0, 34.0)
|
||
# severity: 0 normal, 1 warning, 2 fault
|
||
$VehicleStatusPanel.set_status("Enclosure overtemperature", 2, "TMP-003",
|
||
"68 °C · trip 65 °C · thrusters inhibited", "Inspect cooling before reset")
|
||
```
|
||
|
||
All sample fault codes, responses, and thresholds are illustrative. The UI displays reported vehicle status; gauge zones do not control the ROV or generate its faults.
|
||
|
||
Configure each gauge in the scene Inspector. The numeric references use the voltage nominal or the other gauges' upper fault thresholds. Voltage marks 48 V at center; any deviation enters a yellow region.
|
||
|
||
| Gauge | Display range | Warning zone | Fault zone |
|
||
| --- | --- | --- | --- |
|
||
| Voltage | 42–54 V | Either side of 48 V | Below 45 / above 51 V |
|
||
| Current | 0–36 A | 24–30 A | Above 30 A |
|
||
| Power | 0–1728 W | 1152–1440 W | Above 1440 W |
|
||
| Internal temperature | 0–90 °C | 55–65 °C | Above 65 °C |
|
||
|
||
Only 48 V nominal and 30 A were supplied. The other thresholds need confirmation; 1440 W is the provisional 48 × 30 reference. Markers clamp to the track, but numeric readings remain unclamped.
|
||
|
||
Labels and containers own layout. `status_gauge.gd` draws tracks and markers; `vehicle_status_art.gd` draws the watermark and status background. Warning/fault backgrounds alternate shades once per second; `pulse_alerts` disables that behavior. After two seconds without telemetry, the status is marked STALE and readings are held. Colors come from the shared palette and generated themes.
|
||
|
||
`mode_icon` selects the SVG watermark (stationkeep and ROV samples are in `assets/vector/status/`). Edit `ModeIcon` anchors, rotation, and size in the scene. Readings are right-aligned beside a fixed-width, left-aligned limits column. Off-phase warning/fault shades are derived in the shared palette.
|