ACRO mode implemented

This commit is contained in:
Anton Babushkin
2014-01-31 22:44:05 +01:00
parent d933d523eb
commit 7f4f9a5f5f
9 changed files with 144 additions and 35 deletions
@@ -60,6 +60,7 @@ struct manual_control_setpoint_s {
float return_switch; /**< land 2 position switch (mandatory): land, no effect */
float assisted_switch; /**< assisted 2 position switch (optional): seatbelt, simple */
float mission_switch; /**< mission 2 position switch (optional): mission, loiter */
float acro_switch; /**< acro 2 position switch (optional): normal, acro */
/**
* Any of the channels below may not be available and be set to NaN
+6 -5
View File
@@ -68,11 +68,12 @@ enum RC_CHANNELS_FUNCTION
ASSISTED = 6,
MISSION = 7,
OFFBOARD_MODE = 8,
FLAPS = 9,
AUX_1 = 10,
AUX_2 = 11,
AUX_3 = 12,
AUX_4 = 13,
ACRO = 9,
FLAPS = 10,
AUX_1 = 11,
AUX_2 = 12,
AUX_3 = 13,
AUX_4 = 14,
AUX_5 = 14,
RC_CHANNELS_FUNCTION_MAX /**< indicates the number of functions. There can be more functions than RC channels. */
};
+8
View File
@@ -63,6 +63,7 @@
/* main state machine */
typedef enum {
MAIN_STATE_MANUAL = 0,
MAIN_STATE_ACRO,
MAIN_STATE_SEATBELT,
MAIN_STATE_EASY,
MAIN_STATE_AUTO,
@@ -116,6 +117,12 @@ typedef enum {
MISSION_SWITCH_MISSION
} mission_switch_pos_t;
typedef enum {
ACRO_SWITCH_NONE = 0,
ACRO_SWITCH_NORMAL,
ACRO_SWITCH_ACRO
} acro_switch_pos_t;
enum VEHICLE_MODE_FLAG {
VEHICLE_MODE_FLAG_SAFETY_ARMED = 128,
VEHICLE_MODE_FLAG_MANUAL_INPUT_ENABLED = 64,
@@ -192,6 +199,7 @@ struct vehicle_status_s
return_switch_pos_t return_switch;
assisted_switch_pos_t assisted_switch;
mission_switch_pos_t mission_switch;
acro_switch_pos_t acro_switch;
bool condition_battery_voltage_valid;
bool condition_system_in_air_restore; /**< true if we can restore in mid air */