From 5af84e3b11b6b902ddc311ae9af3d76a06c00e78 Mon Sep 17 00:00:00 2001 From: px4dev Date: Fri, 2 Nov 2012 22:46:52 -0700 Subject: [PATCH] Check for transmit errors. --- apps/drivers/px4io/px4io.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/drivers/px4io/px4io.cpp b/apps/drivers/px4io/px4io.cpp index 51ad934231..7582b7553f 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