I don’t understand what any api or help page is saying, a breakdown would be helpful.
Treats the input ranges as the same, continuous point rather than two boundaries, so it can calculate shorter routes. For example, in a gyro, 0 and 360 are the same point, and should be continuous. Needs setInputRanges.
How would I code that, just getcontroller.setContiuous?
For a PIDController you would use
yourController.enableContinuousInput(0, 360)
You can replace 0 and 360 with whatever values fit your use case.
So if my gyro reads 361 and i need to get to 1 degree it will move 2 degrees to the right position instead of 360 degrees?
Exactly. That’s what continuous input is made for.
However in your example you have your math wrong. If the gyro reads 361 degrees and you want to get to 1 degree, you will have to move 0 degrees. However, if you were at 359 degrees and you needed to get to 1 degree, then it would have to move 2 degrees. It would also have to move 2 degrees to get from 363 degrees to 1 degree.
Oops, my bad but I get the point, thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.