mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 06:51:37 +08:00
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:
@@ -803,7 +803,7 @@ void Simulator::poll_for_MAVLink_messages()
|
|||||||
|
|
||||||
// got data from PIXHAWK
|
// got data from PIXHAWK
|
||||||
if (fd_count > 1 && fds[1].revents & POLLIN) {
|
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) {
|
if (len > 0) {
|
||||||
mavlink_message_t msg;
|
mavlink_message_t msg;
|
||||||
|
|||||||
Reference in New Issue
Block a user