Package frc.robot.motors
Interface LoggedMotor
- All Known Implementing Classes:
SparkMaxWrapper
,TalonFXWrapper
public interface LoggedMotor
-
Method Summary
Modifier and TypeMethodDescriptionGets the unique identifier of a motor for logging purposes.double
Gets the position of the motor in rotations.double
Gets the setpoint of the motor in range [-1, 1].double
Gets the angular velocity of the motor in rotations per minute.double
a.default void
init()
Initializes the motor by adding it to the global motor list in MotorManager.default void
update()
Updates the motors every tick.
-
Method Details
-
update
default void update()Updates the motors every tick. -
init
default void init()Initializes the motor by adding it to the global motor list in MotorManager. -
getIdentifier
String getIdentifier()Gets the unique identifier of a motor for logging purposes. This value is intended to be the CAN ID.- Returns:
- the unique identifier for the motor
-
getLoggedPosition
double getLoggedPosition()Gets the position of the motor in rotations.- Returns:
- the position of the motor in rotations
-
getLoggedVelocity
double getLoggedVelocity()Gets the angular velocity of the motor in rotations per minute.- Returns:
- the angular velocity of the motor in rotations per minute
-
getLoggedSetpoint
double getLoggedSetpoint()Gets the setpoint of the motor in range [-1, 1].- Returns:
- the setpoint in range [-1, 1]
-
getLoggedVoltage
double getLoggedVoltage()a.- Returns:
- a
-