Fixed timeout error handling

This commit is contained in:
Timothy Scott 2019-07-05 11:07:15 +02:00 committed by Julian Oes
parent e6dc847360
commit ffe505b76b

View File

@ -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 {