mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
TImer
timers for hubshift depending on if u win or lose auto dread
This commit is contained in:
@@ -20,6 +20,8 @@ import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
||||
import frc4388.robot.constants.BuildConstants;
|
||||
import frc4388.robot.constants.Constants.SimConstants;
|
||||
import frc4388.utility.DeferredBlock;
|
||||
import frc4388.utility.compute.HubShiftTimer;
|
||||
import frc4388.utility.compute.HubShiftTimer.ShiftInfo;
|
||||
import frc4388.utility.compute.RobotTime;
|
||||
import frc4388.utility.compute.Trim;
|
||||
import frc4388.utility.status.FaultReporter;
|
||||
@@ -74,6 +76,11 @@ public class Robot extends LoggedRobot {
|
||||
// and running subsystem periodic() methods. This must be called from the robot's periodic
|
||||
// block in order for anything in the Command-based framework to work.
|
||||
CommandScheduler.getInstance().run();
|
||||
//Hub Shift logs
|
||||
ShiftInfo info = HubShiftTimer.getShiftInfo();
|
||||
Logger.recordOutput("HubShift/IsActive", info.isActive());
|
||||
Logger.recordOutput("HubShift/RemainingInShift", info.remainingInShift());
|
||||
Logger.recordOutput("HubShift/Phase", info.phase().name());
|
||||
}
|
||||
/**
|
||||
* This function is called once each time the robot enters Disabled mode.
|
||||
@@ -113,6 +120,7 @@ public class Robot extends LoggedRobot {
|
||||
m_autonomousCommand.schedule();
|
||||
}
|
||||
m_robotTime.startMatchTime();
|
||||
HubShiftTimer.initializeAuto();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,6 +146,7 @@ public class Robot extends LoggedRobot {
|
||||
|
||||
}
|
||||
m_robotTime.startMatchTime();
|
||||
HubShiftTimer.initializeTeleop();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,12 +7,12 @@ public final class BuildConstants {
|
||||
public static final String MAVEN_GROUP = "";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||
public static final String VERSION = "unspecified";
|
||||
public static final int GIT_REVISION = 147;
|
||||
public static final String GIT_SHA = "b073fad27703951ba251eaffc56d86f791e531e6";
|
||||
public static final String GIT_DATE = "2026-03-07 20:08:15 MST";
|
||||
public static final String GIT_BRANCH = "PikesPeak";
|
||||
public static final String BUILD_DATE = "2026-03-08 14:27:19 MDT";
|
||||
public static final long BUILD_UNIX_TIME = 1773001639109L;
|
||||
public static final int GIT_REVISION = 148;
|
||||
public static final String GIT_SHA = "5b85bb4ace55dd116c3e80c496ad3ebf986ebfc8";
|
||||
public static final String GIT_DATE = "2026-03-09 10:27:13 MDT";
|
||||
public static final String GIT_BRANCH = "Timer";
|
||||
public static final String BUILD_DATE = "2026-03-17 00:27:11 MDT";
|
||||
public static final long BUILD_UNIX_TIME = 1773728831770L;
|
||||
public static final int DIRTY = 1;
|
||||
|
||||
private BuildConstants(){}
|
||||
|
||||
@@ -19,6 +19,8 @@ import frc4388.robot.subsystems.LED;
|
||||
import frc4388.robot.subsystems.intake.Intake;
|
||||
import frc4388.robot.subsystems.swerve.SwerveDrive;
|
||||
import frc4388.utility.compute.FieldPositions;
|
||||
import frc4388.utility.compute.HubShiftTimer;
|
||||
import frc4388.utility.compute.HubShiftTimer.ShiftInfo;
|
||||
|
||||
public class Shooter extends SubsystemBase {
|
||||
public ShooterIO io;
|
||||
@@ -104,6 +106,7 @@ public class Shooter extends SubsystemBase {
|
||||
// FaultReporter.register(this); // TODO Implement fault reporter
|
||||
|
||||
Logger.processInputs("Shooter", state);
|
||||
|
||||
io.updateInputs(state);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user