Quote:
Originally Posted by Priyesh69
since the x and y data is changing it's not a constant so with what i link the output of the motor. A small example would help
|
Here, this is how I'd attack that piece of code, minus the WPI stuff. I don't now exactly great the angle adjustment would work, but the distance-RPM adjustment is proven.
Though I would put the bang-bang controller in an explicitly timed loop in periodic tasks, and run globals (for the target RPM) to it from autonomous and teleop. If you do that ABSOLUTELY do not forget to send a 0 to it while in disabled mode or you'll wonder why your shooter wheel never stops.
Hope this helps, and good luck!