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