fixedwing_control example fix fds init (#6575)

This commit is contained in:
Daniel Agar
2017-02-13 22:23:16 -05:00
committed by GitHub
parent 4ee8c43ea2
commit 8c837e72be
3 changed files with 8 additions and 6 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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) {