Skip to content
Snippets Groups Projects
Commit 22bd06e5 authored by Julian Oes's avatar Julian Oes
Browse files

mc_pos_control: don't do orb_check on polled topic

When we poll on vehicle_local_position we shouldn't do yet another
orb_check but copy it first up.
parent 0e04d3e9
No related branches found
No related tags found
No related merge requests found
......@@ -412,6 +412,9 @@ MulticopterPositionControl::parameters_update(bool force)
void
MulticopterPositionControl::poll_subscriptions()
{
// This is polled for, so all we need to do is a copy now.
orb_copy(ORB_ID(vehicle_local_position), _local_pos_sub, &_local_pos);
bool updated;
orb_check(_vehicle_status_sub, &updated);
......@@ -447,12 +450,6 @@ MulticopterPositionControl::poll_subscriptions()
orb_copy(ORB_ID(vehicle_control_mode), _control_mode_sub, &_control_mode);
}
orb_check(_local_pos_sub, &updated);
if (updated) {
orb_copy(ORB_ID(vehicle_local_position), _local_pos_sub, &_local_pos);
}
orb_check(_att_sub, &updated);
if (updated) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment