mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 04:00:36 +08:00
Fixed some sitl init bugs.
This commit is contained in:
@@ -463,10 +463,12 @@ void Simulator::pollForMAVLinkMessages(bool publish)
|
||||
char serial_buf[1024];
|
||||
|
||||
struct pollfd fds[2];
|
||||
memset(fds, 0, sizeof(fds));
|
||||
unsigned fd_count = 1;
|
||||
fds[0].fd = _fd;
|
||||
fds[0].events = POLLIN;
|
||||
|
||||
|
||||
if (serial_fd >= 0) {
|
||||
fds[1].fd = serial_fd;
|
||||
fds[1].events = POLLIN;
|
||||
|
||||
Reference in New Issue
Block a user