30 #ifndef AUTOPILOT_STATIC_H
31 #define AUTOPILOT_STATIC_H
35 #define AP_MODE_KILL 0
36 #define AP_MODE_FAILSAFE 1
37 #define AP_MODE_HOME 2
38 #define AP_MODE_RATE_DIRECT 3
39 #define AP_MODE_ATTITUDE_DIRECT 4
40 #define AP_MODE_RATE_RC_CLIMB 5
41 #define AP_MODE_ATTITUDE_RC_CLIMB 6
42 #define AP_MODE_ATTITUDE_CLIMB 7
43 #define AP_MODE_RATE_Z_HOLD 8
44 #define AP_MODE_ATTITUDE_Z_HOLD 9
45 #define AP_MODE_HOVER_DIRECT 10
46 #define AP_MODE_HOVER_CLIMB 11
47 #define AP_MODE_HOVER_Z_HOLD 12
48 #define AP_MODE_NAV 13
49 #define AP_MODE_RC_DIRECT 14 // Safety Pilot Direct Commands for helicopter direct control
50 #define AP_MODE_CARE_FREE_DIRECT 15
51 #define AP_MODE_FORWARD 16
52 #define AP_MODE_MODULE 17
53 #define AP_MODE_FLIP 18
54 #define AP_MODE_GUIDED 19
58 #define AP_ARMING_STATUS_NO_RC 0
59 #define AP_ARMING_STATUS_WAITING 1
60 #define AP_ARMING_STATUS_ARMING 2
61 #define AP_ARMING_STATUS_ARMED 3
62 #define AP_ARMING_STATUS_DISARMING 4
63 #define AP_ARMING_STATUS_KILLED 5
64 #define AP_ARMING_STATUS_YAW_CENTERED 6
65 #define AP_ARMING_STATUS_THROTTLE_DOWN 7
66 #define AP_ARMING_STATUS_NOT_MODE_MANUAL 8
67 #define AP_ARMING_STATUS_UNARMED_IN_AUTO 9
68 #define AP_ARMING_STATUS_THROTTLE_NOT_DOWN 10
69 #define AP_ARMING_STATUS_STICKS_NOT_CENTERED 11
70 #define AP_ARMING_STATUS_PITCH_NOT_CENTERED 12
71 #define AP_ARMING_STATUS_ROLL_NOT_CENTERED 13
72 #define AP_ARMING_STATUS_YAW_NOT_CENTERED 14
73 #define AP_ARMING_STATUS_AHRS_NOT_ALLIGNED 15
74 #define AP_ARMING_STATUS_OUT_OF_GEOFENCE 16
75 #define AP_ARMING_STATUS_LOW_BATTERY 17
80 #define MODE_MANUAL AP_MODE_ATTITUDE_DIRECT
83 #define MODE_AUTO1 AP_MODE_HOVER_Z_HOLD
86 #define MODE_AUTO2 AP_MODE_NAV
void autopilot_static_set_motors_on(bool motors_on)
void autopilot_static_periodic(void)
void autopilot_static_SetModeHandler(float new_autopilot_mode)
AP mode setting handler.
void autopilot_static_init(void)
Static autopilot functions.
void autopilot_static_on_rc_frame(void)
Function to be called when a message from FBW is available.
void autopilot_static_set_mode(uint8_t new_autopilot_mode)