mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
This state is only commander internal. Therefore it doesn't need to be in vehicle_status. Instead it is now in the commander_state message.
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
# Main state, i.e. what user wants. Controlled by RC or from ground station via telemetry link.
|
|
uint8 MAIN_STATE_MANUAL = 0
|
|
uint8 MAIN_STATE_ALTCTL = 1
|
|
uint8 MAIN_STATE_POSCTL = 2
|
|
uint8 MAIN_STATE_AUTO_MISSION = 3
|
|
uint8 MAIN_STATE_AUTO_LOITER = 4
|
|
uint8 MAIN_STATE_AUTO_RTL = 5
|
|
uint8 MAIN_STATE_ACRO = 6
|
|
uint8 MAIN_STATE_OFFBOARD = 7
|
|
uint8 MAIN_STATE_STAB = 8
|
|
uint8 MAIN_STATE_RATTITUDE = 9
|
|
uint8 MAIN_STATE_AUTO_TAKEOFF = 10
|
|
uint8 MAIN_STATE_AUTO_LAND = 11
|
|
uint8 MAIN_STATE_MAX = 12
|
|
|
|
# If you change the order, add or remove arming_state_t states make sure to update the arrays
|
|
# in state_machine_helper.cpp as well.
|
|
uint8 ARMING_STATE_INIT = 0
|
|
uint8 ARMING_STATE_STANDBY = 1
|
|
uint8 ARMING_STATE_ARMED = 2
|
|
uint8 ARMING_STATE_ARMED_ERROR = 3
|
|
uint8 ARMING_STATE_STANDBY_ERROR = 4
|
|
uint8 ARMING_STATE_REBOOT = 5
|
|
uint8 ARMING_STATE_IN_AIR_RESTORE = 6
|
|
uint8 ARMING_STATE_MAX = 7
|
|
|
|
# state machine / state of vehicle.
|
|
# Encodes the complete system state and is set by the commander app.
|
|
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
|
|
|
|
uint8 main_state # main state machine
|