Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Auto-Aligning in Teleop (http://www.chiefdelphi.com/forums/showthread.php?t=150672)

dmelcer9 02-09-2016 15:57

Re: Auto-Aligning in Teleop
 
Quote:

Originally Posted by Joe Ross (Post 1604246)
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.


All times are GMT -5. The time now is 20:24.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi