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
+6 -4
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
* 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) {