mirror of
https://github.com/Team4388/Robot-Essentials.git
synced 2026-06-09 00:38:01 -06:00
Convert RobotTime into a singleton
This commit is contained in:
@@ -24,6 +24,8 @@ public class Drive extends SubsystemBase {
|
||||
// Put methods for controlling this subsystem
|
||||
// here. Call these from Commands.
|
||||
|
||||
private RobotTime m_robotTime = RobotTime.getInstance();
|
||||
|
||||
private WPI_TalonSRX m_leftFrontMotor;
|
||||
private WPI_TalonSRX m_rightFrontMotor;
|
||||
private WPI_TalonSRX m_leftBackMotor;
|
||||
@@ -49,7 +51,7 @@ public class Drive extends SubsystemBase {
|
||||
public void periodic() {
|
||||
m_gyro.updatePigeonDeltas();
|
||||
|
||||
if (RobotTime.m_frameNumber % DriveConstants.SMARTDASHBOARD_UPDATE_FRAME == 0) {
|
||||
if (m_robotTime.m_frameNumber % DriveConstants.SMARTDASHBOARD_UPDATE_FRAME == 0) {
|
||||
updateSmartDashboard();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user