mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 14:33:34 +08:00
commander: WIP, SEATBELT renamed to ASSISTED, added SIMPLE mode, added ASSISTED switch, some cleanup and reorganizing
This commit is contained in:
@@ -58,6 +58,7 @@ struct manual_control_setpoint_s {
|
||||
|
||||
float mode_switch; /**< mode 3 position switch (mandatory): manual, assisted, auto */
|
||||
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 */
|
||||
|
||||
/**
|
||||
|
||||
@@ -60,12 +60,13 @@
|
||||
|
||||
/* State Machine */
|
||||
typedef enum {
|
||||
NAVIGATION_STATE_INIT=0,
|
||||
NAVIGATION_STATE_INIT = 0,
|
||||
NAVIGATION_STATE_MANUAL_STANDBY,
|
||||
NAVIGATION_STATE_MANUAL,
|
||||
NAVIGATION_STATE_SEATBELT_STANDBY,
|
||||
NAVIGATION_STATE_SEATBELT,
|
||||
NAVIGATION_STATE_SEATBELT_DESCENT,
|
||||
NAVIGATION_STATE_ASSISTED_STANDBY,
|
||||
NAVIGATION_STATE_ASSISTED_SEATBELT,
|
||||
NAVIGATION_STATE_ASSISTED_SIMPLE,
|
||||
NAVIGATION_STATE_ASSISTED_DESCENT,
|
||||
NAVIGATION_STATE_AUTO_STANDBY,
|
||||
NAVIGATION_STATE_AUTO_READY,
|
||||
NAVIGATION_STATE_AUTO_TAKEOFF,
|
||||
@@ -98,7 +99,7 @@ typedef enum {
|
||||
|
||||
typedef enum {
|
||||
MODE_SWITCH_MANUAL = 0,
|
||||
MODE_SWITCH_SEATBELT,
|
||||
MODE_SWITCH_ASSISTED,
|
||||
MODE_SWITCH_AUTO
|
||||
} mode_switch_pos_t;
|
||||
|
||||
@@ -107,6 +108,11 @@ typedef enum {
|
||||
RETURN_SWITCH_RETURN
|
||||
} return_switch_pos_t;
|
||||
|
||||
typedef enum {
|
||||
ASSISTED_SWITCH_SEATBELT = 0,
|
||||
ASSISTED_SWITCH_SIMPLE
|
||||
} assisted_switch_pos_t;
|
||||
|
||||
typedef enum {
|
||||
MISSION_SWITCH_NONE = 0,
|
||||
MISSION_SWITCH_MISSION
|
||||
@@ -179,6 +185,7 @@ struct vehicle_status_s
|
||||
|
||||
mode_switch_pos_t mode_switch;
|
||||
return_switch_pos_t return_switch;
|
||||
assisted_switch_pos_t assisted_switch;
|
||||
mission_switch_pos_t mission_switch;
|
||||
|
||||
bool condition_battery_voltage_valid;
|
||||
|
||||
Reference in New Issue
Block a user