2D Operations Dashboard (Dashboard)
š What is this for? (Quick Summary)ā
In Simple Words:
This is our primary operational control panel, deployed athttps://dashboard.tutr.tech.When operators are conducting real track runs, this is the main screen they use:
- Large, easy-to-read dials for Speed, Acceleration, Voltage, and Temperatures.
- Live camera video feeds from both vehicle cameras.
- Clear control buttons: Enable Battery, Launch, and a large red Emergency Stop.
- An automated voice that speaks warnings out loud (like a radio flight controller) so you don't miss an alarm while watching the track.
1. What Technologies Are Used?ā
- Frontend: React 19 with Vite (very fast build tool).
- Styling: Tailwind CSS with official crimson red and clean white branding.
- Audio Voice: Uses the browser's built-in
window.speechSynthesisto speak warnings. - Automated Tests: 33 Vitest unit tests in
src/__tests__/to guarantee that buttons, safety locks, and voice alarms cannot break.
2. Key Featuresā
2.1 Live Dials & Gaugesā
- Speed & Accel: Big digital readouts showing current velocity in km/h and acceleration in m/s².
- Battery Gauge: Radial meter showing pack voltage (~364V) and percentage remaining (SOC %).
- Thermal Bars: Temperature bars for the motor drive electronics and the linear induction motor.
- 2D Track Map: A bird's-eye view schematic showing an icon of the pod moving from 0m to 600m.
2.2 Live Dual-Camera Videoā
- Plays live video from both CAM 1 (front track) and CAM 2 (dock view) with under 1 second delay using WebRTC.
- Supports expanding to full-screen or swapping cameras with one click.
2.3 Physical Vehicle Controlsā
- Enable Battery Button: Powers the 364V contactor. Checks that voltage is above 48V before enabling Launch.
- Launch Button: Starts the flight test run.
- Emergency Stop Button: The big red button. If pressed, it immediately cuts power to the drive, aborts the run, and starts a 30-second safety cooldown.
3. Running Tests Locallyā
To make sure everything is working before making any code changes:
cd "Client Dashboard/Dashboard"
npm run test
All 33 tests should pass green in under 2 seconds!