Land-detector: Better granularity for manual and auto flight modes

This commit is contained in:
Lorenz Meier
2016-04-29 14:50:45 +02:00
parent 234068989b
commit 5c1d2c1cee
3 changed files with 37 additions and 14 deletions
@@ -51,6 +51,7 @@
#include <uORB/topics/parameter_update.h>
#include <uORB/topics/manual_control_setpoint.h>
#include <uORB/topics/control_state.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <systemlib/param/param.h>
namespace landdetection
@@ -125,6 +126,7 @@ private:
int _attitudeSub;
int _manualSub;
int _ctrl_state_sub;
int _vehicle_control_mode_sub;
struct vehicle_local_position_s _vehicleLocalPosition;
struct actuator_controls_s _actuators;
@@ -132,6 +134,7 @@ private:
struct vehicle_attitude_s _vehicleAttitude;
struct manual_control_setpoint_s _manual;
struct control_state_s _ctrl_state;
struct vehicle_control_mode_s _ctrl_mode;
uint64_t _landTimer; ///< timestamp in microseconds since a possible land was detected
uint64_t _freefallTimer; ///< timestamp in microseconds since a possible freefall was detected