View Single Post
  #1   Spotlight this post!  
Unread 01-10-2009, 01:30 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
PIDController class (PIDSource/PIDOutput interfaces?)

I was looking at the WPILib codebase and saw that their PIDController class uses the PIDSource and PITOutput interfaces for I/O to/from the control loop. However I was surprised to see that no WPILib classes actually inherit from these interfaces.

Is the intention that I should inherit from PIDSource and PIDOutput as necessary? Ex:

Code:
class PIDEncoder : public Encoder, public PIDSource
{
... (override PIDget() here)
};

class PIDJaguar : public Jaguar, public PIDOutput
{
... (override WritePID() here)
};
Or is there some other intended design pattern that I'm not getting?

Thanks
Reply With Quote