mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[commands] Use Timer.restart() (#5023)
This commit is contained in:
@@ -257,8 +257,7 @@ void MecanumControllerCommand::Initialize() {
|
||||
m_prevSpeeds = m_kinematics.ToWheelSpeeds(
|
||||
frc::ChassisSpeeds{initialXVelocity, initialYVelocity, 0_rad_per_s});
|
||||
|
||||
m_timer.Reset();
|
||||
m_timer.Start();
|
||||
m_timer.Restart();
|
||||
if (m_usePID) {
|
||||
m_frontLeftController->Reset();
|
||||
m_rearLeftController->Reset();
|
||||
|
||||
@@ -92,8 +92,7 @@ void RamseteCommand::Initialize() {
|
||||
m_prevSpeeds = m_kinematics.ToWheelSpeeds(
|
||||
frc::ChassisSpeeds{initialState.velocity, 0_mps,
|
||||
initialState.velocity * initialState.curvature});
|
||||
m_timer.Reset();
|
||||
m_timer.Start();
|
||||
m_timer.Restart();
|
||||
if (m_usePID) {
|
||||
m_leftController->Reset();
|
||||
m_rightController->Reset();
|
||||
|
||||
@@ -15,8 +15,7 @@ WaitCommand::WaitCommand(units::second_t duration) : m_duration{duration} {
|
||||
}
|
||||
|
||||
void WaitCommand::Initialize() {
|
||||
m_timer.Reset();
|
||||
m_timer.Start();
|
||||
m_timer.Restart();
|
||||
}
|
||||
|
||||
void WaitCommand::End(bool interrupted) {
|
||||
|
||||
Reference in New Issue
Block a user