pbio/control: clear stalled flag on stop
This ensures that the flag is correct if it is read just after stopping, before it is updated again by the control loop.
@@ -119,6 +119,7 @@ void pbio_control_stop(pbio_control_t *ctl) {
ctl->type = PBIO_CONTROL_NONE;
ctl->on_target = true;
ctl->on_target_func = pbio_control_on_target_always;
+ ctl->stalled = false;
}
pbio_error_t pbio_control_start_angle_control(pbio_control_t *ctl, int32_t time_now, int32_t count_now, int32_t target_count, int32_t rate_now, int32_t target_rate, int32_t acceleration, pbio_actuation_t after_stop) {
