Skip to content
Snippets Groups Projects
Commit 513c973f authored by Matthias Grob's avatar Matthias Grob Committed by Beat Küng
Browse files

mc_pos_control: assign events field outside of initializer

Necessary because NuttX defines pollfd differend from
the POSIX standard. The difference of field order makes
use of C++ designated initializers to compile for both
platforms impossible.
parent 09e563ad
No related branches found
No related tags found
No related merge requests found
......@@ -595,7 +595,8 @@ MulticopterPositionControl::run()
_att_sp.landing_gear = vehicle_attitude_setpoint_s::LANDING_GEAR_DOWN;
// setup file descriptor to poll the local position as loop wakeup source
px4_pollfd_struct_t poll_fd = {.fd = _local_pos_sub, .events = POLLIN};
px4_pollfd_struct_t poll_fd = {.fd = _local_pos_sub};
poll_fd.events = POLLIN;
while (!should_exit()) {
// poll for new data on the local position state topic (wait for up to 20ms)
......
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