Navigator: Fix compile error

This commit is contained in:
Lorenz Meier
2015-11-22 15:55:49 +01:00
parent 2730d8ab20
commit 4950762d4e
+8 -10
View File
@@ -392,17 +392,7 @@ Navigator::task_main()
home_position_update();
}
/* global position updated */
if (fds[0].revents & POLLIN) {
global_position_update();
if (_geofence.getSource() == Geofence::GF_SOURCE_GLOBALPOS) {
have_geofence_position_data = true;
}
}
bool updated;
orb_check(_vehicle_command_sub, &updated);
if (updated) {
vehicle_command_s cmd;
orb_copy(ORB_ID(vehicle_command), _vehicle_command_sub, &cmd);
@@ -412,6 +402,14 @@ Navigator::task_main()
}
}
/* global position updated */
if (fds[0].revents & POLLIN) {
global_position_update();
if (_geofence.getSource() == Geofence::GF_SOURCE_GLOBALPOS) {
have_geofence_position_data = true;
}
}
/* Check geofence violation */
static hrt_abstime last_geofence_check = 0;
if (have_geofence_position_data &&