Skip to content

Conversation

@fibonacci61
Copy link
Contributor

This PR updates the control loop traits to accept dt optionally, so that None can be passed in its place upon the loop's first iteration where there is no delta time. In addition, the motion algorithms have been updated to pass None.

@lewisfm lewisfm requested a review from tropicaaal August 11, 2025 19:16
@tropicaaal
Copy link
Member

tropicaaal commented Sep 25, 2025

I don't think this is necessary? Every algorithm in evian::motion will start with a delay, meaning dt should never end up being zero or near-zero, and always reflect the cycle time of the loop. For the same reason, we pre-compute initial values of any delta so that prev_val in a motion algorithm always has some meaning (which prevents division-by-zero and other nasty things on the first loop iteration). I think that encouraging motions to be written this way versus just passing None has other advantages too.

@fibonacci61 fibonacci61 marked this pull request as draft October 2, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants