Open agausmann opened 7 years ago
One thing we need to consider when making this change is whether Strongback should still provide measurements in degrees. The Gyroscope
interface documentation explicitly states that its outputs are degrees and degrees per second, but the Talon's sensor and target I/O uses revolutions and RPM when a scale is provided by one of the methods outlined above.
While trying to implement closed-loop speed control on my Talon SRX, I found two methods that were of great use.
CANTalon.configEncoderCodesPerRev()
andCANTalon.configPotentiometerTurns()
allow the user to provide the instance with an encoder resolution in common units. Delegating these would be able to replace the current scaling implementation that is provided by Strongback (pulses per degree). IMO this would be a preferred way of scaling encoder input, and I am not sure whether speed control would be feasible with the way that Strongback handles scaling right now.