Class RobotControllerWrapper


  • public class RobotControllerWrapper
    extends java.lang.Object
    Wrapper around the WPILib RobotController class. Follows the singleton pattern for testability.
    • Constructor Detail

      • RobotControllerWrapper

        public RobotControllerWrapper()
        Private constructor. Does nothing.
    • 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.