mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 15:47:35 +08:00
fixedwing_control example fix fds init (#6575)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2013, 2014 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2013-2017 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -313,9 +313,11 @@ int fixedwing_control_thread_main(int argc, char *argv[])
|
||||
|
||||
/* Setup of loop */
|
||||
|
||||
struct pollfd fds[2] = {{ .fd = param_sub, .events = POLLIN },
|
||||
{ .fd = att_sub, .events = POLLIN }
|
||||
};
|
||||
struct pollfd fds[2] = {};
|
||||
fds[0].fd = param_sub;
|
||||
fds[0].events = POLLIN;
|
||||
fds[1].fd = att_sub;
|
||||
fds[1].events = POLLIN;
|
||||
|
||||
while (!thread_should_exit) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user