This repository was archived by the owner on Nov 3, 2024. It is now read-only.
Stepping Code - Minor Speedup #40
IhorNehrutsa
started this conversation in
General
Replies: 2 comments 4 replies
|
Sounds good. In reality, we don't really need to do hardly any multiplications. We can just add to the currentAngle like usual (needed for correction and PID), but we can also add to the currentStep, allowing the complete cutout of a good amount of equations. However, we still need to use a int32_t for the currentStep, as the steps and angle can sometimes go negative, depending on where the motor was powered on. I'll add this later today |
4 replies
|
Floating point operations are usually slower than integers. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
1/32
Let's look at the stepping code from low to up.
So we can use integer calculations instead of float.
All reactions