The application had confusing state terminology that conflicted with PX4’s actual arming status:
❌ CONFUSING OLD SYSTEM:
State.ARMED = 1 → MISLEADING! This meant “Mission loaded, waiting for trigger time”State.TRIGGERED = 2 → UNCLEAR! This meant “Mission is executing”vs PX4 Real Arming:
is_armed → Whether PX4 is actually armedis_ready_to_arm → Whether pre-arm checks passFile: src/enums.py
class State(Enum):
IDLE = 0
MISSION_READY = 1 # Was: ARMED (Mission loaded, waiting for trigger)
MISSION_EXECUTING = 2 # Was: TRIGGERED (Mission is executing)
UNKNOWN = 999
Files Updated:
src/drone_setup.py - All mission execution logiccoordinator.py - State transition handlingChanges:
State.ARMED → State.MISSION_READYState.TRIGGERED → State.MISSION_EXECUTINGNew File: app/dashboard/drone-dashboard/src/constants/droneStates.js
export const DRONE_SHOW_STATES = {
0: 'Idle', // No mission loaded
1: 'Mission Ready', // Mission loaded, waiting for trigger time
2: 'Mission Executing', // Mission is currently executing
999: 'Unknown' // Unknown/error state
};
Updated Components:
DroneDetail.js - Shows “Mission State” instead of “State”DroneWidget.js - Enhanced mission state badges with visual indicatorsNew CSS Classes in DroneWidget.css:
| Mission State | Badge Color | Border | Animation |
|---|---|---|---|
| Idle | Gray | None | None |
| Mission Ready | Orange | Orange left border | Pulsing |
| Mission Executing | Teal | Teal left border | Fast pulse |
src/enums.py - State enum definitionssrc/drone_setup.py - Mission execution handlerscoordinator.py - State transition logicapp/dashboard/drone-dashboard/src/constants/droneStates.js - NEW state mappingapp/dashboard/drone-dashboard/src/components/DroneDetail.js - Enhanced displayapp/dashboard/drone-dashboard/src/components/DroneWidget.js - Mission state badgesapp/dashboard/drone-dashboard/src/styles/DroneWidget.css - Visual indicatorsThe changes are semantic only - all logic flows are identical:
Test these workflows:
Author: Claude Code Assistant
Date: 2025-09-06
Impact: UI/UX Enhancement, No Functional Changes