mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
fixedwing_control example fix fds init (#6575)
This commit is contained in:
@@ -186,7 +186,7 @@ set(config_module_list
|
|||||||
|
|
||||||
# Tutorial code from
|
# Tutorial code from
|
||||||
# https://px4.io/dev/example_fixedwing_control
|
# https://px4.io/dev/example_fixedwing_control
|
||||||
#examples/fixedwing_control
|
examples/fixedwing_control
|
||||||
|
|
||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#examples/hwtest
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ set(config_module_list
|
|||||||
|
|
||||||
# Tutorial code from
|
# Tutorial code from
|
||||||
# https://px4.io/dev/example_fixedwing_control
|
# https://px4.io/dev/example_fixedwing_control
|
||||||
#examples/fixedwing_control
|
examples/fixedwing_control
|
||||||
|
|
||||||
# Hardware test
|
# Hardware test
|
||||||
#examples/hwtest
|
#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
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -313,9 +313,11 @@ int fixedwing_control_thread_main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* Setup of loop */
|
/* Setup of loop */
|
||||||
|
|
||||||
struct pollfd fds[2] = {{ .fd = param_sub, .events = POLLIN },
|
struct pollfd fds[2] = {};
|
||||||
{ .fd = att_sub, .events = POLLIN }
|
fds[0].fd = param_sub;
|
||||||
};
|
fds[0].events = POLLIN;
|
||||||
|
fds[1].fd = att_sub;
|
||||||
|
fds[1].events = POLLIN;
|
||||||
|
|
||||||
while (!thread_should_exit) {
|
while (!thread_should_exit) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user