mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 00:03:34 +08:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user