diff options
author | Jean Cyr <jcyr@dillobits.com> | 2013-07-07 14:29:30 -0400 |
---|---|---|
committer | Jean Cyr <jcyr@dillobits.com> | 2013-07-07 14:29:30 -0400 |
commit | 35711280df491c27ea42bd93d8102168a8514896 (patch) | |
tree | 71c5b995f1702d24db6f4e0ad242c138b286ac08 /src/drivers/px4io | |
parent | 7a6a786708814c3ddfa2973189a7334144e4e741 (diff) | |
parent | cf2dbdf9a1ae06c7d0e0a7963916a3709a1bc075 (diff) | |
download | px4-firmware-35711280df491c27ea42bd93d8102168a8514896.tar.gz px4-firmware-35711280df491c27ea42bd93d8102168a8514896.tar.bz2 px4-firmware-35711280df491c27ea42bd93d8102168a8514896.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/drivers/px4io')
-rw-r--r-- | src/drivers/px4io/uploader.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/drivers/px4io/uploader.cpp b/src/drivers/px4io/uploader.cpp index 15524c3ae..9e3f041e3 100644 --- a/src/drivers/px4io/uploader.cpp +++ b/src/drivers/px4io/uploader.cpp @@ -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; } |