mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 05:13:34 +08:00
Fixed timeout error handling
This commit is contained in:
committed by
Julian Oes
parent
e6dc847360
commit
ffe505b76b
@@ -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);
|
err_code = read(_uart, rbuff_curr, rbytes - bytes_read);
|
||||||
|
|
||||||
if (err_code < 0) {
|
if (err_code <= 0) {
|
||||||
return err_code;
|
return err_code;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user