2026 - RebuiltHubManager

Static Badge

import com.btwrobotics.WhatTime.frc.YearlyMethods.Rebuilt.RebuiltHubManager;

RebuiltHubManager is a class that simplifies management of hub related features for the 2026 game. It is able to track which alliance has an inactive hub first as well as automatically switching the active hub as it changes throughout the match.


Constructor

public RebuiltHubManager(MatchTimeManager matchTimeManager) {
    this.matchTimeManager = matchTimeManager;
}
RebuiltHubManager rebuiltHubManager = new RebuiltHubManager(matchTimeManager);
  • matchTimeManager: A class from WhatTime that keeps track of time in the current match.


Methods & Usage

For this class to work, you must call the methods updateInitialInactiveAlliance() and scheduleAllInactiveHubChanges() in your robot code.

Updates which alliance is inactive first based on the results from autonomous:

public void updateInitialInactiveAlliance()

Example Usage in RobotContainer.java:

@Override
public void teleopInit() {
    rebuiltHubManager.updateInitialInactiveAlliance();
}

Returns the alliance that is inactive first:

public Optional<Alliance> getInactiveFirstAlliance()

Note

Requires v2026.1.15 or later


Returns true if the current team’s hub is active:

public boolean hubIsActive()

Add triggers at times to change the hub status:

This should be called only once.

public void scheduleAllInactiveHubChanges()

Example Usage in RobotContainer.java:

@Override
public void robotInit() {
    rebuiltHubManager.scheduleAllInactiveHubChanges();
}

Put a list of all past and upcoming events to NetworkTables:

putPhasesToNetworkTables()

Example Usage in RobotContainer.java:

@Override
public void robotPeriodic() {
    rebuiltHubManager.putPhasesToNetworkTables();
}