diff options
author | Andrew Tridgell <tridge@samba.org> | 2014-01-24 11:06:33 +1100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-01-24 12:35:19 +0100 |
commit | d8c1131f1e8e61bcb15b0faa36de1bba00e9716d (patch) | |
tree | a24c06a39ce60c5a450e3ff7db6b3810bb461712 /src | |
parent | 4524fe3e4888d569f855d1e7a82c8d5116636a0a (diff) | |
download | px4-firmware-d8c1131f1e8e61bcb15b0faa36de1bba00e9716d.tar.gz px4-firmware-d8c1131f1e8e61bcb15b0faa36de1bba00e9716d.tar.bz2 px4-firmware-d8c1131f1e8e61bcb15b0faa36de1bba00e9716d.zip |
px4io: improved reliability of forceupdate re-starting px4io
this adds a 0.1s delay after update to give px4io time to boot. It
removes the need for the user to reboot after an IO update
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/px4io/px4io_uploader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/px4io/px4io_uploader.cpp b/src/drivers/px4io/px4io_uploader.cpp index 41f93a8ee..d9f991210 100644 --- a/src/drivers/px4io/px4io_uploader.cpp +++ b/src/drivers/px4io/px4io_uploader.cpp @@ -51,6 +51,7 @@ #include <poll.h> #include <termios.h> #include <sys/stat.h> +#include <nuttx/arch.h> #include <crc32.h> @@ -226,6 +227,11 @@ PX4IO_Uploader::upload(const char *filenames[]) close(_fw_fd); close(_io_fd); _io_fd = -1; + + // sleep for enough time for the IO chip to boot. This makes + // forceupdate more reliably startup IO again after update + up_udelay(100*1000); + return ret; } |