So, I want to use an AsyncPosPIDController in auto to control my tray, but I want to use the internal pid for UC. How would I accomplish this?
In the builder: okapi::AsyncPosControllerBuilder class | OkapiLib A PROS library for programming VEX robots
If you specify gains, it will make an AsyncPosPIDController (uses OkapiLib’s PID). If you don’t, it will make an AsyncPosIntegratedController (uses the integrated control).
If you want to use one for autonomous and another for opcontrol, you could follow point three here to make sure the objects are destructed properly: A note about where to use builders | OkapiLib A PROS library for programming VEX robots
Use the builder in a local scope and save the built object to a variable also in the same local scope
2 Likes