From ffe505b76bdfa166c14abb6af13e1650aff465a3 Mon Sep 17 00:00:00 2001 From: Timothy Scott Date: Fri, 5 Jul 2019 11:07:15 +0200 Subject: [PATCH] Fixed timeout error handling --- src/drivers/roboclaw/RoboClaw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/roboclaw/RoboClaw.cpp b/src/drivers/roboclaw/RoboClaw.cpp index 9762cfcdb1..c6f5b47952 100644 --- a/src/drivers/roboclaw/RoboClaw.cpp +++ b/src/drivers/roboclaw/RoboClaw.cpp @@ -486,7 +486,7 @@ int RoboClaw::_transaction(e_command cmd, uint8_t *wbuff, size_t wbytes, err_code = read(_uart, rbuff_curr, rbytes - bytes_read); - if (err_code < 0) { + if (err_code <= 0) { return err_code; } else {