Class FPGAClock


  • public class FPGAClock
    extends java.lang.Object
    Tools for interacting with the FPGA's high-precision clock
    • Constructor Summary

      Constructors 
      Constructor Description
      FPGAClock()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double getFPGAMilliseconds()
      Get the number of milliseconds since the robot timer started
      static double getFPGASeconds()
      Get the number of seconds since the robot timer started
      static boolean getMillisecondCycle​(double period)
      A utility for anything that needs to toggle every N milliseconds (for example, a blinking light)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FPGAClock

        public FPGAClock()
    • Method Detail

      • getFPGASeconds

        public static double getFPGASeconds()
        Get the number of seconds since the robot timer started
        Returns:
        Seconds since timer start
      • getFPGAMilliseconds

        public static double getFPGAMilliseconds()
        Get the number of milliseconds since the robot timer started
        Returns:
        Milliseconds since timer start
      • getMillisecondCycle

        public static boolean getMillisecondCycle​(double period)
        A utility for anything that needs to toggle every N milliseconds (for example, a blinking light)
        Parameters:
        period - Number of milliseconds to wait before toggling the output
        Returns:
        Output