diff options
author | Steven Blass <steven.r.blass@gmail.com> | 2014-11-18 08:40:52 -0500 |
---|---|---|
committer | Steven Blass <steven.r.blass@gmail.com> | 2014-11-18 08:40:52 -0500 |
commit | 69271a7251a0bcfd980c3534194b73fc45fa5f23 (patch) | |
tree | 9db4721eeaad19d6757844c0e3d73734efc1f626 | |
parent | b8ee71220e35a00a19f9686fda43c05e519cffba (diff) | |
download | px4-firmware-69271a7251a0bcfd980c3534194b73fc45fa5f23.tar.gz px4-firmware-69271a7251a0bcfd980c3534194b73fc45fa5f23.tar.bz2 px4-firmware-69271a7251a0bcfd980c3534194b73fc45fa5f23.zip |
made invalid setpoints publish once every time it enters an invalid state
-rw-r--r-- | src/modules/navigator/navigator_main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 035b0d18c..df620e5e7 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -428,12 +428,15 @@ Navigator::task_main() _can_loiter_at_sp = false; break; case NAVIGATION_STATE_AUTO_MISSION: + _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_mission; break; case NAVIGATION_STATE_AUTO_LOITER: + _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_loiter; break; case NAVIGATION_STATE_AUTO_RCRECOVER: + _pos_sp_triplet_published_invalid_once = false; if (_param_rcloss_obc.get() != 0) { _navigation_mode = &_rcLoss; } else { @@ -441,11 +444,13 @@ Navigator::task_main() } break; case NAVIGATION_STATE_AUTO_RTL: - _navigation_mode = &_rtl; + _pos_sp_triplet_published_invalid_once = false; + _navigation_mode = &_rtl; break; case NAVIGATION_STATE_AUTO_RTGS: /* Use complex data link loss mode only when enabled via param * otherwise use rtl */ + _pos_sp_triplet_published_invalid_once = false; if (_param_datalinkloss_obc.get() != 0) { _navigation_mode = &_dataLinkLoss; } else { @@ -453,9 +458,11 @@ Navigator::task_main() } break; case NAVIGATION_STATE_AUTO_LANDENGFAIL: + _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_engineFailure; break; case NAVIGATION_STATE_AUTO_LANDGPSFAIL: + _pos_sp_triplet_published_invalid_once = false; _navigation_mode = &_gpsFailure; break; default: |