44 #define COMMANDER_STATE_MAIN_STATE_MANUAL 0 45 #define COMMANDER_STATE_MAIN_STATE_ALTCTL 1 46 #define COMMANDER_STATE_MAIN_STATE_POSCTL 2 47 #define COMMANDER_STATE_MAIN_STATE_AUTO_MISSION 3 48 #define COMMANDER_STATE_MAIN_STATE_AUTO_LOITER 4 49 #define COMMANDER_STATE_MAIN_STATE_AUTO_RTL 5 50 #define COMMANDER_STATE_MAIN_STATE_ACRO 6 51 #define COMMANDER_STATE_MAIN_STATE_OFFBOARD 7 52 #define COMMANDER_STATE_MAIN_STATE_STAB 8 53 #define COMMANDER_STATE_MAIN_STATE_RATTITUDE 9 54 #define COMMANDER_STATE_MAIN_STATE_AUTO_TAKEOFF 10 55 #define COMMANDER_STATE_MAIN_STATE_AUTO_LAND 11 56 #define COMMANDER_STATE_MAIN_STATE_AUTO_FOLLOW_TARGET 12 57 #define COMMANDER_STATE_MAIN_STATE_AUTO_PRECLAND 13 58 #define COMMANDER_STATE_MAIN_STATE_ORBIT 14 59 #define COMMANDER_STATE_MAIN_STATE_MAX 15 75 static constexpr uint8_t MAIN_STATE_MANUAL = 0;
76 static constexpr uint8_t MAIN_STATE_ALTCTL = 1;
77 static constexpr uint8_t MAIN_STATE_POSCTL = 2;
78 static constexpr uint8_t MAIN_STATE_AUTO_MISSION = 3;
79 static constexpr uint8_t MAIN_STATE_AUTO_LOITER = 4;
80 static constexpr uint8_t MAIN_STATE_AUTO_RTL = 5;
81 static constexpr uint8_t MAIN_STATE_ACRO = 6;
82 static constexpr uint8_t MAIN_STATE_OFFBOARD = 7;
83 static constexpr uint8_t MAIN_STATE_STAB = 8;
84 static constexpr uint8_t MAIN_STATE_RATTITUDE = 9;
85 static constexpr uint8_t MAIN_STATE_AUTO_TAKEOFF = 10;
86 static constexpr uint8_t MAIN_STATE_AUTO_LAND = 11;
87 static constexpr uint8_t MAIN_STATE_AUTO_FOLLOW_TARGET = 12;
88 static constexpr uint8_t MAIN_STATE_AUTO_PRECLAND = 13;
89 static constexpr uint8_t MAIN_STATE_ORBIT = 14;
90 static constexpr uint8_t MAIN_STATE_MAX = 15;
API for the uORB lightweight object broker.
ORB_DECLARE(commander_state)