Class ActiveHub

java.lang.Object
frc.robot.util.ActiveHub

public class ActiveHub extends Object
Class for tracking which hub is active
  • Field Details

    • activeHub

      public static Trigger activeHub
  • Constructor Details

    • ActiveHub

      public ActiveHub()
  • Method Details

    • currentHubIsActive

      public static boolean currentHubIsActive()
    • timeLeftInCurrentPhase

      public static double timeLeftInCurrentPhase()
      Returns the time left in the current phase of the match.

      The match is divided into 6 phases, with the following time limits:

      • Transition Phase: 2:20 - 2:10
      • Phase 1: 2:10 - 1:45
      • Phase 2: 1:45 - 1:20
      • Phase 3: 1:20 - 0:55
      • Phase 4: 0:55 - 0:30
      • End Game: 0:30 - 0:00
      Returns:
      time left in the current phase of the match, or -1 if the match is over, or if the match time is not available or not in TeleOp.