mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
fixedwing_control example fix fds init (#6575)
This commit is contained in:
parent
4ee8c43ea2
commit
8c837e72be
@ -186,7 +186,7 @@ set(config_module_list
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/example_fixedwing_control
|
||||
#examples/fixedwing_control
|
||||
examples/fixedwing_control
|
||||
|
||||
# Hardware test
|
||||
#examples/hwtest
|
||||
|
||||
@ -185,7 +185,7 @@ set(config_module_list
|
||||
|
||||
# Tutorial code from
|
||||
# https://px4.io/dev/example_fixedwing_control
|
||||
#examples/fixedwing_control
|
||||
examples/fixedwing_control
|
||||
|
||||
# Hardware test
|
||||
#examples/hwtest
|
||||
|
||||
@ -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) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user