diff options
author | Steven Blass <steven.r.blass@gmail.com> | 2014-11-18 08:36:26 -0500 |
---|---|---|
committer | Steven Blass <steven.r.blass@gmail.com> | 2014-11-18 08:36:26 -0500 |
commit | b8ee71220e35a00a19f9686fda43c05e519cffba (patch) | |
tree | 8b4c9dda65e4febb0ebdd4e06f93d7e8e9d8b804 /src/modules/navigator/navigator_main.cpp | |
parent | aa152c335c04a1897effb59ef955276d01a50008 (diff) | |
parent | 4eb930f704018253a4cff3604cb9faee8468283b (diff) | |
download | px4-firmware-b8ee71220e35a00a19f9686fda43c05e519cffba.tar.gz px4-firmware-b8ee71220e35a00a19f9686fda43c05e519cffba.tar.bz2 px4-firmware-b8ee71220e35a00a19f9686fda43c05e519cffba.zip |
Merge branch 'offboard_fix'
Diffstat (limited to 'src/modules/navigator/navigator_main.cpp')
-rw-r--r-- | src/modules/navigator/navigator_main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 5e9806499..035b0d18c 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -137,6 +137,7 @@ Navigator::Navigator() : _gpsFailure(this, "GPSF"), _can_loiter_at_sp(false), _pos_sp_triplet_updated(false), + _pos_sp_triplet_published_invalid_once(false), _param_loiter_radius(this, "LOITER_RAD"), _param_acceptance_radius(this, "ACC_RAD"), _param_datalinkloss_obc(this, "DLL_OBC"), @@ -469,9 +470,8 @@ Navigator::task_main() } /* if nothing is running, set position setpoint triplet invalid once */ - static bool published_once = false; - if (_navigation_mode == nullptr && !published_once) { - published_once = true; + if (_navigation_mode == nullptr && !_pos_sp_triplet_published_invalid_once) { + _pos_sp_triplet_published_invalid_once = true; _pos_sp_triplet.previous.valid = false; _pos_sp_triplet.current.valid = false; _pos_sp_triplet.next.valid = false; |