diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-07-21 23:56:32 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-07-21 23:56:32 +0200 |
commit | a9a8f1435fa798b289aa4e4af9312041abdbcf94 (patch) | |
tree | 54e746c95f41cbecc4064031a7c426ecd96ec540 /src/modules/navigator/datalinkloss.h | |
parent | 86b9e367a6cc5791f83df3223190a470798c00ff (diff) | |
download | px4-firmware-a9a8f1435fa798b289aa4e4af9312041abdbcf94.tar.gz px4-firmware-a9a8f1435fa798b289aa4e4af9312041abdbcf94.tar.bz2 px4-firmware-a9a8f1435fa798b289aa4e4af9312041abdbcf94.zip |
abort comm loss mode if counter above param and return home directly
Diffstat (limited to 'src/modules/navigator/datalinkloss.h')
-rw-r--r-- | src/modules/navigator/datalinkloss.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/src/modules/navigator/datalinkloss.h b/src/modules/navigator/datalinkloss.h index 101c88a25..650cc7bc5 100644 --- a/src/modules/navigator/datalinkloss.h +++ b/src/modules/navigator/datalinkloss.h @@ -43,10 +43,7 @@ #include <controllib/blocks.hpp> #include <controllib/block/BlockParam.hpp> -#include <uORB/topics/mission.h> -#include <uORB/topics/mission.h> -#include <uORB/topics/home_position.h> -#include <uORB/topics/vehicle_global_position.h> +#include <uORB/Subscription.hpp> #include "navigator_mode.h" #include "mission_block.h" @@ -67,6 +64,25 @@ public: virtual void on_active(); private: + /* Subscriptions */ + uORB::Subscription<vehicle_status_s> _vehicleStatus; + + /* Params */ + control::BlockParamFloat _param_commsholdwaittime; + control::BlockParamInt _param_commsholdlat; // * 1e7 + control::BlockParamInt _param_commsholdlon; // * 1e7 + control::BlockParamFloat _param_commsholdalt; + control::BlockParamInt _param_airfieldhomelat; // * 1e7 + control::BlockParamInt _param_airfieldhomelon; // * 1e7 + control::BlockParamFloat _param_airfieldhomealt; + control::BlockParamInt _param_numberdatalinklosses; + + enum DLLState { + DLL_STATE_NONE = 0, + DLL_STATE_FLYTOCOMMSHOLDWP = 1, + DLL_STATE_FLYTOAIRFIELDHOMEWP = 2, + } _dll_state; + /** * Set the DLL item */ @@ -77,18 +93,5 @@ private: */ void advance_dll(); - enum DLLState { - DLL_STATE_NONE = 0, - DLL_STATE_FLYTOCOMMSHOLDWP = 1, - DLL_STATE_FLYTOAIRFIELDHOMEWP = 2, - } _dll_state; - - control::BlockParamFloat _param_commsholdwaittime; - control::BlockParamInt _param_commsholdlat; // * 1e7 - control::BlockParamInt _param_commsholdlon; // * 1e7 - control::BlockParamFloat _param_commsholdalt; - control::BlockParamInt _param_airfieldhomelat; // * 1e7 - control::BlockParamInt _param_airfieldhomelon; // * 1e7 - control::BlockParamFloat _param_airfieldhomealt; }; #endif |