mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-02-08 08:21:52 +08:00
fix return value of ODriveArduino::run_state()
Previously, the function would return false in most cases even on success.
This commit is contained in:
@@ -66,7 +66,7 @@ bool ODriveArduino::run_state(int axis, int requested_state, bool wait) {
|
||||
do {
|
||||
delay(100);
|
||||
serial_ << "r axis" << axis << ".current_state\n";
|
||||
} while (readInt() != AXIS_STATE_IDLE && --timeout_ctr > 0);
|
||||
} while (readInt() != requested_state && --timeout_ctr > 0);
|
||||
}
|
||||
|
||||
return timeout_ctr > 0;
|
||||
|
||||
Reference in New Issue
Block a user