Quote:
Originally Posted by Joe Ross
It will output to anything which implements the PIDOutput interface. It's correct to say that single motor controllers do. But it's not correct to say it doesn't allow output to a drive train, just that you need to make your drivetrain implement the PIDOutput interface.
|
Even easier is if you use Java, you can simply use a method reference:
Code:
new PIDController(Kp, Ki, Kd, RobotMap.mySensor, Robot.subsystem::outputMethod);
where outputMethod has the signature:
Code:
public void outputMethod(double output);
This assumes that you are using the command-based robot, but you get the idea. A lambda would work too.