Interface TorqueEncoderMotor
- All Known Subinterfaces:
TorqueSmartMotor
- All Known Implementing Classes:
TorqueFalcon
,TorqueSparkMax
,TorqueTalon
public interface TorqueEncoderMotor
Interface to include encoder feedback methods for motors.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
double
double
double
double
double
double
double
double
static double
getWheelRPM
(TorqueEncoderMotor motor, double gearRatio) Finds velocity of a drive wheel in RPMs.static double
getWheelVelocity
(TorqueEncoderMotor motor, double gearRatio, double wheelRadiusMeters) Finds Velocity of a Drive Wheel in meters per second
-
Method Details
-
getPosition
double getPosition() -
getPositionDegrees
double getPositionDegrees() -
getPositionRotations
double getPositionRotations() -
getVelocity
double getVelocity() -
getVelocityRPS
double getVelocityRPS() -
getVelocityRPM
double getVelocityRPM() -
getAcceleration
double getAcceleration() -
getAccelerationRPS
double getAccelerationRPS() -
getAccelerationRPM
double getAccelerationRPM() -
getWheelRPM
Finds velocity of a drive wheel in RPMs.- Parameters:
motor
- Torque motor that implements TorqueEncoderMotor.gearRatio
- The gear ratio of the wheel.- Returns:
- RPM of the wheel.
-
getWheelVelocity
static double getWheelVelocity(TorqueEncoderMotor motor, double gearRatio, double wheelRadiusMeters) Finds Velocity of a Drive Wheel in meters per second- Parameters:
motor
- Torque motor that implements TorqueEncoderMotor.gearRatio
- The gear ratio of the wheel.wheelRadiusMeters
- Radius of the wheel in meters.- Returns:
- Velocity of the wheel in m/s.
-