Go to Post Being in FIRST and putting the focus on the robot is like building a robot and putting the focus on the bandsaw (or mill or lathe, or whatever you do your machining with). The robot is a tool we use to play the game, the game is a tool we use to inspire and teach. - GeeTwo [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 02-09-2016, 15:57
dmelcer9 dmelcer9 is offline
Registered User
AKA: Daniel
FRC #0810 (Mechanical Bulls)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2012
Location: Smithtown
Posts: 51
dmelcer9 is an unknown quantity at this point
Re: Auto-Aligning in Teleop

Quote:
Originally Posted by Joe Ross View Post
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:00.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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