mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 02:06:27 +08:00
fw_pos_control_l1 consolidate message updates
This commit is contained in:
committed by
Lorenz Meier
parent
458d8f7b02
commit
a1f660119c
@@ -1514,12 +1514,6 @@ FixedwingPositionControl::run()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
vehicle_control_mode_poll();
|
|
||||||
vehicle_command_poll();
|
|
||||||
vehicle_land_detected_poll();
|
|
||||||
vehicle_status_poll();
|
|
||||||
_sub_sensors.update();
|
|
||||||
|
|
||||||
/* only update parameters if they changed */
|
/* only update parameters if they changed */
|
||||||
bool params_updated = false;
|
bool params_updated = false;
|
||||||
orb_check(_params_sub, ¶ms_updated);
|
orb_check(_params_sub, ¶ms_updated);
|
||||||
@@ -1562,10 +1556,15 @@ FixedwingPositionControl::run()
|
|||||||
_alt_reset_counter = _global_pos.alt_reset_counter;
|
_alt_reset_counter = _global_pos.alt_reset_counter;
|
||||||
_pos_reset_counter = _global_pos.lat_lon_reset_counter;
|
_pos_reset_counter = _global_pos.lat_lon_reset_counter;
|
||||||
|
|
||||||
|
_sub_sensors.update();
|
||||||
airspeed_poll();
|
airspeed_poll();
|
||||||
vehicle_attitude_poll();
|
|
||||||
manual_control_setpoint_poll();
|
manual_control_setpoint_poll();
|
||||||
position_setpoint_triplet_poll();
|
position_setpoint_triplet_poll();
|
||||||
|
vehicle_attitude_poll();
|
||||||
|
vehicle_command_poll();
|
||||||
|
vehicle_control_mode_poll();
|
||||||
|
vehicle_land_detected_poll();
|
||||||
|
vehicle_status_poll();
|
||||||
|
|
||||||
math::Vector<2> curr_pos((float)_global_pos.lat, (float)_global_pos.lon);
|
math::Vector<2> curr_pos((float)_global_pos.lat, (float)_global_pos.lon);
|
||||||
math::Vector<2> ground_speed(_global_pos.vel_n, _global_pos.vel_e);
|
math::Vector<2> ground_speed(_global_pos.vel_n, _global_pos.vel_e);
|
||||||
|
|||||||
Reference in New Issue
Block a user