Package com.team2813.lib2813.subsystems
Class MotorSubsystem.ControlledMotor
java.lang.Object
com.team2813.lib2813.subsystems.MotorSubsystem.ControlledMotor
- All Implemented Interfaces:
Motor
- Enclosing class:
MotorSubsystem<T extends Supplier<Angle>>
A motor that is controlled by a subclass of
MotorSubsystem.-
Method Summary
Modifier and TypeMethodDescriptionGets the current that is being applied onto the motorvoidset(ControlMode mode, double demand) Sets the motor to run with a specified mode of control.voidset(ControlMode mode, double demand, double feedForward) Sets the motor to run with a specified mode of control, and feedForward.voidStops the motor.
-
Method Details
-
set
Sets the motor to run with a specified mode of control.Additionally, this method disables PID control of the subsystem
-
set
Sets the motor to run with a specified mode of control, and feedForward.Additionally, this method disables PID control of the subsystem. It does not clamp the provided value.
-
getAppliedCurrent
Description copied from interface:MotorGets the current that is being applied onto the motor- Specified by:
getAppliedCurrentin interfaceMotor- Returns:
- The current applied current
-
stopMotor
public void stopMotor()Stops the motor.The motor voltage will be set to zero, and the motor will not adjust to move towards the current setpoint.
-