[commands] Use Timer.restart() (#5023)

This commit is contained in:
Sriman Achanta
2023-01-29 10:21:07 -05:00
committed by GitHub
parent 8bf67b1b33
commit f75acd11ce
18 changed files with 18 additions and 40 deletions

View File

@@ -332,8 +332,7 @@ public class MecanumControllerCommand extends CommandBase {
m_prevSpeeds =
m_kinematics.toWheelSpeeds(new ChassisSpeeds(initialXVelocity, initialYVelocity, 0.0));
m_timer.reset();
m_timer.start();
m_timer.restart();
}
@Override

View File

@@ -143,8 +143,7 @@ public class RamseteCommand extends CommandBase {
initialState.velocityMetersPerSecond,
0,
initialState.curvatureRadPerMeter * initialState.velocityMetersPerSecond));
m_timer.reset();
m_timer.start();
m_timer.restart();
if (m_usePID) {
m_leftController.reset();
m_rightController.reset();

View File

@@ -210,8 +210,7 @@ public class SwerveControllerCommand extends CommandBase {
@Override
public void initialize() {
m_timer.reset();
m_timer.start();
m_timer.restart();
}
@Override

View File

@@ -39,8 +39,7 @@ public class TrapezoidProfileCommand extends CommandBase {
@Override
public void initialize() {
m_timer.reset();
m_timer.start();
m_timer.restart();
}
@Override

View File

@@ -30,8 +30,7 @@ public class WaitCommand extends CommandBase {
@Override
public void initialize() {
m_timer.reset();
m_timer.start();
m_timer.restart();
}
@Override