Skip to content

Commit

Permalink
pbio/motor_process: Reset timer instead of restart.
Browse files Browse the repository at this point in the history
For the observer model, it is more important for the loop time to be
constant on average.

This reverts commit 2174461.

See pybricks/support#955
  • Loading branch information
laurensvalk committed Feb 23, 2023
1 parent 8e982ed commit 69dab05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pbio/src/motor_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROCESS_THREAD(pbio_motor_process, ev, data) {
pbio_servo_update_all();

// Reset timer to wait for next update
etimer_restart(&timer);
etimer_reset(&timer);
}

PROCESS_END();
Expand Down

0 comments on commit 69dab05

Please sign in to comment.