mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
navigator: publish global_position_setpoint on vehicle_status updates
This commit is contained in:
parent
a1cf8801bb
commit
60554c8a56
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user