Skip to content

Commit

Permalink
pbio/control: clear stalled flag on stop
Browse files Browse the repository at this point in the history
This ensures that the flag is correct if it is read just after stopping, before it is updated again by the control loop.
  • Loading branch information
laurensvalk committed Apr 20, 2020
1 parent ca65b2f commit 0f03812
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/pbio/src/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0f03812

Please sign in to comment.