Skip to content

Conversation

ahiuchingau
Copy link
Contributor

This PR adds a test for the movement profile used in the Flex Stacker and fixes a motion bug.

I found a delay in motion control; when the motor speed is set to take exactly one step each time the motor timer ticks, the first tick wouldn't cause a step. It's because the bitwise comparison doesn't work very well while we're at the step boundary.

By setting the step flag to (static_cast<uint64_t>(1) << radix) - 1;, we can make sure we're taking a step right when it happens.

The longer I look at this math, the more confused I get. So apologies in advance if none of this makes sense.

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's a great idea, nice!

@ahiuchingau ahiuchingau force-pushed the EXEC-997 branch 2 times, most recently from 055f820 to 8453f5a Compare February 25, 2025 23:00
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