diff options
author | px4dev <px4@purgatory.org> | 2012-11-02 22:46:52 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-11-03 01:14:24 -0700 |
commit | 5af84e3b11b6b902ddc311ae9af3d76a06c00e78 (patch) | |
tree | 768d46e60c63951962ad954bcb5422c81371a1fb | |
parent | e36bd4b2431ee659f473ca807e9a9fcef8c2e894 (diff) | |
download | px4-firmware-5af84e3b11b6b902ddc311ae9af3d76a06c00e78.tar.gz px4-firmware-5af84e3b11b6b902ddc311ae9af3d76a06c00e78.tar.bz2 px4-firmware-5af84e3b11b6b902ddc311ae9af3d76a06c00e78.zip |
Check for transmit errors.
-rw-r--r-- | apps/drivers/px4io/px4io.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/drivers/px4io/px4io.cpp b/apps/drivers/px4io/px4io.cpp index 51ad93423..7582b7553 100644 --- a/apps/drivers/px4io/px4io.cpp +++ b/apps/drivers/px4io/px4io.cpp @@ -425,6 +425,7 @@ void PX4IO::io_send() { px4io_command cmd; + int ret; cmd.f2i_magic = F2I_MAGIC; @@ -439,7 +440,9 @@ PX4IO::io_send() cmd.arm_ok = _armed.armed; - hx_stream_send(_io_stream, &cmd, sizeof(cmd)); + ret = hx_stream_send(_io_stream, &cmd, sizeof(cmd)); + if (ret) + debug("send error %d", ret); } int |