mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 01:23:33 +08:00
Merge branch 'master' into new_state_machine
compiling again Conflicts: src/modules/fixedwing_att_control/fixedwing_att_control_att.c src/modules/fixedwing_att_control/fixedwing_att_control_rate.c src/modules/fixedwing_pos_control/fixedwing_pos_control_main.c src/modules/mavlink/orb_listener.c src/modules/multirotor_att_control/multirotor_attitude_control.c src/modules/multirotor_att_control/multirotor_rate_control.c src/modules/systemlib/pid/pid.c src/modules/systemlib/pid/pid.h src/modules/uORB/objects_common.cpp
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <termios.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "uploader.h"
|
||||
@@ -121,6 +122,12 @@ PX4IO_Uploader::upload(const char *filenames[])
|
||||
return -errno;
|
||||
}
|
||||
|
||||
/* adjust line speed to match bootloader */
|
||||
struct termios t;
|
||||
tcgetattr(_io_fd, &t);
|
||||
cfsetspeed(&t, 115200);
|
||||
tcsetattr(_io_fd, TCSANOW, &t);
|
||||
|
||||
/* look for the bootloader */
|
||||
ret = sync();
|
||||
|
||||
@@ -251,7 +258,7 @@ PX4IO_Uploader::recv(uint8_t &c, unsigned timeout)
|
||||
int ret = ::poll(&fds[0], 1, timeout);
|
||||
|
||||
if (ret < 1) {
|
||||
log("poll timeout %d", ret);
|
||||
//log("poll timeout %d", ret);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user