OFFBOARD switch added, WIP

This commit is contained in:
Anton Babushkin
2014-01-22 16:52:35 +01:00
parent 93e096f63b
commit 1dc9785083
5 changed files with 34 additions and 21 deletions
@@ -60,15 +60,13 @@ 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 offboard_switch; /**< offboard switch (optional): offboard, onboard */
/**
* Any of the channels below may not be available and be set to NaN
* to indicate that it does not contain valid data.
*/
// XXX needed or parameter?
//float auto_offboard_input_switch; /**< controller setpoint source (0 = onboard, 1 = offboard) */
float flaps; /**< flap position */
float aux1; /**< default function: camera yaw / azimuth */
+8
View File
@@ -64,6 +64,7 @@ typedef enum {
MAIN_STATE_SEATBELT,
MAIN_STATE_EASY,
MAIN_STATE_AUTO,
MAIN_STATE_OFFBOARD,
} main_state_t;
typedef enum {
@@ -109,6 +110,12 @@ typedef enum {
MISSION_SWITCH_MISSION
} mission_switch_pos_t;
typedef enum {
OFFBOARD_SWITCH_NONE = 0,
OFFBOARD_SWITCH_OFFBOARD,
OFFBOARD_SWITCH_ONBOARD
} offboard_switch_pos_t;
enum VEHICLE_MODE_FLAG {
VEHICLE_MODE_FLAG_SAFETY_ARMED = 128,
VEHICLE_MODE_FLAG_MANUAL_INPUT_ENABLED = 64,
@@ -184,6 +191,7 @@ struct vehicle_status_s
return_switch_pos_t return_switch;
assisted_switch_pos_t assisted_switch;
mission_switch_pos_t mission_switch;
offboard_switch_pos_t offboard_switch;
bool condition_battery_voltage_valid;
bool condition_system_in_air_restore; /**< true if we can restore in mid air */