aboutsummaryrefslogtreecommitdiff
path: root/apps/uORB/topics/vehicle_status.h
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-08-13 18:53:37 +0200
committerLorenz Meier <lm@inf.ethz.ch>2012-08-13 18:53:37 +0200
commit9014577aff02233e890d1f8eefc06471fca8b6d2 (patch)
treebd589542e278bad3e4978d2098587ffc76c29681 /apps/uORB/topics/vehicle_status.h
parent56b3b46f75c0b434932eecba2ac7207f84e2342e (diff)
downloadpx4-firmware-9014577aff02233e890d1f8eefc06471fca8b6d2.tar.gz
px4-firmware-9014577aff02233e890d1f8eefc06471fca8b6d2.tar.bz2
px4-firmware-9014577aff02233e890d1f8eefc06471fca8b6d2.zip
Massive improvements in state machine, still tracing wrong throttle scaling in manual input path
Diffstat (limited to 'apps/uORB/topics/vehicle_status.h')
-rw-r--r--apps/uORB/topics/vehicle_status.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/uORB/topics/vehicle_status.h b/apps/uORB/topics/vehicle_status.h
index 9f72c8f78..8b2b6525c 100644
--- a/apps/uORB/topics/vehicle_status.h
+++ b/apps/uORB/topics/vehicle_status.h
@@ -86,6 +86,12 @@ enum VEHICLE_MODE_FLAG {
VEHICLE_MODE_FLAG_CUSTOM_MODE_ENABLED = 1
}; /**< 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
+};
+
/**
* state machine / state of vehicle.
*
@@ -98,7 +104,9 @@ struct vehicle_status_s
uint16_t counter; /**< incremented by the writing thread everytime new data is stored */
uint64_t timestamp; /**< in microseconds since system start, is set whenever the writing thread stores new data */
- commander_state_machine_t state_machine;
+ 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 */
+
uint8_t mode;
bool control_manual_enabled; /**< true if manual input is mixed in */