team2485 / frc-2017

Robot Code for FRC Steamworks
3 stars 0 forks source link

WarlordsPIDSource and PIDSourceWrapper #16

Closed jmcculloch2018 closed 7 years ago

jmcculloch2018 commented 7 years ago

In a few instances, we will be creating our own custom sensors (i.e. curvature sensor), or other PID sources. Each time one has to do this, one must currently create a class that implements the interface PIDSource and write all 3 necessary methods. Most of the time, however, pidGet is the only necessary method, and one can save time and improve clarity by only writing this method. Thus, we will make an interface, WarlordsPIDSource, with only one method, and a PIDSourceWrapper converts a WarlordsPIDSource to a PIDSource.