diff options
author | Ban Siesta <bansiesta@gmail.com> | 2014-12-19 23:36:32 +0000 |
---|---|---|
committer | Ban Siesta <bansiesta@gmail.com> | 2014-12-19 23:36:32 +0000 |
commit | f0ff914b626fbfb497143f80b19376efb524b9e1 (patch) | |
tree | 5f59df961ca8d8d3c196f79d64e635e6ba9fef23 /src/modules/navigator/navigator.h | |
parent | c9ca61ef5b23a370fcaf3e2a0546ab5452b65733 (diff) | |
download | px4-firmware-f0ff914b626fbfb497143f80b19376efb524b9e1.tar.gz px4-firmware-f0ff914b626fbfb497143f80b19376efb524b9e1.tar.bz2 px4-firmware-f0ff914b626fbfb497143f80b19376efb524b9e1.zip |
navigator: don't publish mission result immediately but only after every iteration of the navigator
Diffstat (limited to 'src/modules/navigator/navigator.h')
-rw-r--r-- | src/modules/navigator/navigator.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/modules/navigator/navigator.h b/src/modules/navigator/navigator.h index a701e3f44..d9d911d9c 100644 --- a/src/modules/navigator/navigator.h +++ b/src/modules/navigator/navigator.h @@ -108,11 +108,6 @@ public: void load_fence_from_file(const char *filename); /** - * Publish the mission result so commander and mavlink know what is going on - */ - void publish_mission_result(); - - /** * Publish the geofence result */ void publish_geofence_result(); @@ -128,6 +123,7 @@ public: */ void set_can_loiter_at_sp(bool can_loiter) { _can_loiter_at_sp = can_loiter; } void set_position_setpoint_triplet_updated() { _pos_sp_triplet_updated = true; } + void set_mission_result_updated() { _mission_result_updated = true; } /** * Getters @@ -215,6 +211,7 @@ private: bool _can_loiter_at_sp; /**< flags if current position SP can be used to loiter */ bool _pos_sp_triplet_updated; /**< flags if position SP triplet needs to be published */ bool _pos_sp_triplet_published_invalid_once; /**< flags if position SP triplet has been published once to UORB */ + bool _mission_result_updated; /**< flags if mission result has seen an update */ control::BlockParamFloat _param_loiter_radius; /**< loiter radius for fixedwing */ control::BlockParamFloat _param_acceptance_radius; /**< acceptance for takeoff */ @@ -280,6 +277,12 @@ private: */ void publish_position_setpoint_triplet(); + + /** + * Publish the mission result so commander and mavlink know what is going on + */ + void publish_mission_result(); + /* this class has ptr data members, so it should not be copied, * consequently the copy constructors are private. */ |