diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-04-23 14:15:59 +0200 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-04-23 14:15:59 +0200 |
commit | 60554c8a5682bc5b2edb66e1ca6b7a9163b1dbf9 (patch) | |
tree | eccfbe8613e7f8f0e364a3b94674d0115e9745f9 /src/modules/navigator/navigator_main.cpp | |
parent | a1cf8801bb000e38d11b4573d7cde452f02abbc3 (diff) | |
download | px4-firmware-60554c8a5682bc5b2edb66e1ca6b7a9163b1dbf9.tar.gz px4-firmware-60554c8a5682bc5b2edb66e1ca6b7a9163b1dbf9.tar.bz2 px4-firmware-60554c8a5682bc5b2edb66e1ca6b7a9163b1dbf9.zip |
navigator: publish global_position_setpoint on vehicle_status updates
Diffstat (limited to 'src/modules/navigator/navigator_main.cpp')
-rw-r--r-- | src/modules/navigator/navigator_main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index d8f7c1273..37009ff69 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -692,6 +692,9 @@ Navigator::task_main() /* evaluate state machine from commander and set the navigator mode accordingly */ if (_control_mode.flag_armed && _control_mode.flag_control_auto_enabled) { + /* publish position setpoint triplet on each status update if navigator active */ + _pos_sp_triplet_updated = true; + bool stick_mode = false; if (!_vstatus.rc_signal_lost) { @@ -813,8 +816,8 @@ Navigator::task_main() if (fds[1].revents & POLLIN) { global_position_update(); - /* publish position setpoint triplet on each position update if navigator active */ if (_control_mode.flag_armed && _control_mode.flag_control_auto_enabled) { + /* publish position setpoint triplet on each position update if navigator active */ _pos_sp_triplet_updated = true; if (myState == NAV_STATE_LAND && !_global_pos_valid) { |