Class MockSpeedController
- java.lang.Object
-
- io.github.frc5024.lib5k.hardware.generic.motors.MockSpeedController
-
- All Implemented Interfaces:
PIDOutput
,SpeedController
public class MockSpeedController extends java.lang.Object implements SpeedController
For mocking a speed controller in tests
-
-
Constructor Summary
Constructors Constructor Description MockSpeedController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disable()
double
get()
boolean
getInverted()
void
pidWrite(double output)
void
set(double speed)
void
setInverted(boolean inverted)
void
stopMotor()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.wpi.first.wpilibj.SpeedController
setVoltage
-
-
-
-
Method Detail
-
set
public void set(double speed)
- Specified by:
set
in interfaceSpeedController
-
get
public double get()
- Specified by:
get
in interfaceSpeedController
-
stopMotor
public void stopMotor()
- Specified by:
stopMotor
in interfaceSpeedController
-
disable
public void disable()
- Specified by:
disable
in interfaceSpeedController
-
setInverted
public void setInverted(boolean inverted)
- Specified by:
setInverted
in interfaceSpeedController
-
getInverted
public boolean getInverted()
- Specified by:
getInverted
in interfaceSpeedController
-
-