aboutsummaryrefslogtreecommitdiff
path: root/apps/uORB/topics/vehicle_status.h
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-08-18 16:48:43 +0200
committerLorenz Meier <lm@inf.ethz.ch>2012-08-18 16:48:43 +0200
commitdc484c1d21fcb7bc4f4be97853647321e8a147e1 (patch)
tree4b51a2ff911967318d725bf58bed77b1247468b5 /apps/uORB/topics/vehicle_status.h
parente707574f73b8ed0e9103fd999bd43847c657b5e1 (diff)
downloadpx4-firmware-dc484c1d21fcb7bc4f4be97853647321e8a147e1.tar.gz
px4-firmware-dc484c1d21fcb7bc4f4be97853647321e8a147e1.tar.bz2
px4-firmware-dc484c1d21fcb7bc4f4be97853647321e8a147e1.zip
State machine cleanup, introduced variable rates for MAVLink depending on the baud rate
Diffstat (limited to 'apps/uORB/topics/vehicle_status.h')
-rw-r--r--apps/uORB/topics/vehicle_status.h32
1 files changed, 23 insertions, 9 deletions
diff --git a/apps/uORB/topics/vehicle_status.h b/apps/uORB/topics/vehicle_status.h
index 2cd179da0..c378b05f1 100644
--- a/apps/uORB/topics/vehicle_status.h
+++ b/apps/uORB/topics/vehicle_status.h
@@ -87,9 +87,16 @@ enum VEHICLE_MODE_FLAG {
}; /**< Same as MAV_MODE_FLAG of MAVLink 1.0 protocol */
enum VEHICLE_FLIGHT_MODE {
- VEHICLE_FLIGHT_MODE_MANUAL,
- VEHICLE_FLIGHT_MODE_STABILIZED,
- VEHICLE_FLIGHT_MODE_AUTO
+ VEHICLE_FLIGHT_MODE_MANUAL = 0, /**< direct manual control, same as VEHICLE_FLIGHT_MODE_ATTITUDE for multirotors */
+ VEHICLE_FLIGHT_MODE_ATTITUDE, /**< attitude or rate stabilization, as defined by VEHICLE_ATTITUDE_MODE */
+ VEHICLE_FLIGHT_MODE_STABILIZED, /**< attitude or rate stabilization plus velocity or position stabilization */
+ VEHICLE_FLIGHT_MODE_AUTO /**< attitude or rate stabilization plus absolute position control and waypoints */
+};
+
+enum VEHICLE_ATTITUDE_MODE {
+ VEHICLE_ATTITUDE_MODE_DIRECT, /**< no attitude control, direct stick input mixing (only fixed wing) */
+ VEHICLE_ATTITUDE_MODE_RATES, /**< body rates control mode */
+ VEHICLE_ATTITUDE_MODE_ATTITUDE /**< tait-bryan attitude control mode */
};
/**
@@ -106,14 +113,21 @@ struct vehicle_status_s
commander_state_machine_t state_machine; /**< Current flight state, main state machine */
enum VEHICLE_FLIGHT_MODE flight_mode; /**< Current flight mode, as defined by mode switch */
+ enum VEHICLE_ATTITUDE_MODE attitute_mode; /**< Current attitude control mode, as defined by VEHICLE_ATTITUDE_MODE enum */
+
+ // uint8_t mode;
+
+
+ /* system flags - these represent the state predicates */
- uint8_t mode;
+ bool flag_system_armed; /**< True is motors / actuators are armed */
+ bool flag_control_manual_enabled; /**< true if manual input is mixed in */
+ bool flag_hil_enabled; /**< True if hardware in the loop simulation is enabled */
- bool control_manual_enabled; /**< true if manual input is mixed in */
- bool control_rates_enabled; /**< true if rates are stabilized */
- bool control_attitude_enabled; /**< true if attitude stabilization is mixed in */
- bool control_speed_enabled; /**< true if speed (implies direction) is controlled */
- bool control_position_enabled; /**< true if position is controlled */
+ // bool flag_control_rates_enabled; /**< true if rates are stabilized */
+ // bool flag_control_attitude_enabled; *< true if attitude stabilization is mixed in
+ // bool control_speed_enabled; /**< true if speed (implies direction) is controlled */
+ // bool control_position_enabled; /**< true if position is controlled */
bool preflight_gyro_calibration; /**< true if gyro calibration is requested */
bool preflight_mag_calibration; /**< true if mag calibration is requested */