diff --git a/cmake/configs/nuttx_px4fmu-v3_default.cmake b/cmake/configs/nuttx_px4fmu-v3_default.cmake index ddb372872e..0e85f11734 100644 --- a/cmake/configs/nuttx_px4fmu-v3_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v3_default.cmake @@ -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 diff --git a/cmake/configs/nuttx_px4fmu-v4_default.cmake b/cmake/configs/nuttx_px4fmu-v4_default.cmake index 1e350ed475..8dfccf605a 100644 --- a/cmake/configs/nuttx_px4fmu-v4_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v4_default.cmake @@ -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 diff --git a/src/examples/fixedwing_control/main.cpp b/src/examples/fixedwing_control/main.cpp index b3ecd47945..fc235d23e9 100644 --- a/src/examples/fixedwing_control/main.cpp +++ b/src/examples/fixedwing_control/main.cpp @@ -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) {