Package frc.spectrumLib.hardware
Class SpectrumCANcoderConfig
java.lang.Object
frc.spectrumLib.hardware.SpectrumCANcoderConfig
-
Constructor Summary
ConstructorsConstructorDescriptionSpectrumCANcoderConfig(double rotorToSensorRatio, double sensorToMechanismRatio, double offset, boolean attached, boolean inverted) -
Method Summary
Modifier and TypeMethodDescriptionintdoubleOffset applied to the reading, in rotations.doubleRotor turns per CANcoder turn.doubleCANcoder turns per mechanism turn.booleanfalsebuilds no CANcoder, for sim or a robot without one.booleantruemakes clockwise rotation positive.voidsetCANcoderID(int CANcoderID)
-
Constructor Details
-
SpectrumCANcoderConfig
public SpectrumCANcoderConfig(double rotorToSensorRatio, double sensorToMechanismRatio, double offset, boolean attached, boolean inverted)
-
-
Method Details
-
getCANcoderID
public int getCANcoderID() -
setCANcoderID
public void setCANcoderID(int CANcoderID) -
getRotorToSensorRatio
public double getRotorToSensorRatio()Rotor turns per CANcoder turn. -
getSensorToMechanismRatio
public double getSensorToMechanismRatio()CANcoder turns per mechanism turn. -
getOffset
public double getOffset()Offset applied to the reading, in rotations. -
isAttached
public boolean isAttached()falsebuilds no CANcoder, for sim or a robot without one. -
isInverted
public boolean isInverted()truemakes clockwise rotation positive.
-