simulator: fixing missing declaration

The "len" variable was not defined and gave me an error, declaring it as "int" fixed it
This commit is contained in:
rfauvet 2019-06-03 16:02:36 +02:00 committed by Daniel Agar
parent 8966ad59c7
commit 755eccbe60
1 changed files with 1 additions and 1 deletions

View File

@ -803,7 +803,7 @@ void Simulator::poll_for_MAVLink_messages()
// got data from PIXHAWK
if (fd_count > 1 && fds[1].revents & POLLIN) {
len = ::read(serial_fd, serial_buf, sizeof(serial_buf));
int len = ::read(serial_fd, serial_buf, sizeof(serial_buf));
if (len > 0) {
mavlink_message_t msg;