mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 22:53:34 +08:00
navigator: publish global_position_setpoint on vehicle_status updates
This commit is contained in:
@@ -692,6 +692,9 @@ Navigator::task_main()
|
|||||||
|
|
||||||
/* evaluate state machine from commander and set the navigator mode accordingly */
|
/* evaluate state machine from commander and set the navigator mode accordingly */
|
||||||
if (_control_mode.flag_armed && _control_mode.flag_control_auto_enabled) {
|
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;
|
bool stick_mode = false;
|
||||||
|
|
||||||
if (!_vstatus.rc_signal_lost) {
|
if (!_vstatus.rc_signal_lost) {
|
||||||
@@ -813,8 +816,8 @@ Navigator::task_main()
|
|||||||
if (fds[1].revents & POLLIN) {
|
if (fds[1].revents & POLLIN) {
|
||||||
global_position_update();
|
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) {
|
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;
|
_pos_sp_triplet_updated = true;
|
||||||
|
|
||||||
if (myState == NAV_STATE_LAND && !_global_pos_valid) {
|
if (myState == NAV_STATE_LAND && !_global_pos_valid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user