Package frc.team88.swerve.util
Class RobotControllerWrapper
- java.lang.Object
-
- frc.team88.swerve.util.RobotControllerWrapper
-
public class RobotControllerWrapper extends java.lang.Object
Wrapper around the WPILib RobotController class. Follows the singleton pattern for testability.
-
-
Constructor Summary
Constructors Constructor Description RobotControllerWrapper()
Private constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getFPGATime()
Read the microsecond timer from the FPGA.static RobotControllerWrapper
getInstance()
Get the singleton instancestatic void
setInstance(RobotControllerWrapper instance)
Sets the singleton instance.
-
-
-
Method Detail
-
getInstance
public static RobotControllerWrapper getInstance()
Get the singleton instance- Returns:
- The singleton instance
-
setInstance
public static void setInstance(RobotControllerWrapper instance)
Sets the singleton instance. Used only for testing.- Parameters:
instance
- The new singleton instance to set.
-
getFPGATime
public long getFPGATime()
Read the microsecond timer from the FPGA.- Returns:
- The current time in microseconds according to the FPGA.
-
-