mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Fix Timer usage in TrapezoidProfileCommand (#1992)
This commit is contained in:
@@ -25,7 +25,7 @@ void TrapezoidProfileCommand::Initialize() {
|
||||
}
|
||||
|
||||
void TrapezoidProfileCommand::Execute() {
|
||||
m_output(m_profile.Calculate(units::second_t(m_timer.Get())));
|
||||
m_output(m_profile.Calculate(m_timer.Get()));
|
||||
}
|
||||
|
||||
void TrapezoidProfileCommand::End(bool interrupted) { m_timer.Stop(); }
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <frc/Timer.h>
|
||||
#include <frc/trajectory/TrapezoidProfile.h>
|
||||
#include <frc2/Timer.h>
|
||||
|
||||
#include <functional>
|
||||
|
||||
@@ -49,7 +49,7 @@ class TrapezoidProfileCommand
|
||||
frc::TrapezoidProfile m_profile;
|
||||
std::function<void(frc::TrapezoidProfile::State)> m_output;
|
||||
|
||||
frc::Timer m_timer;
|
||||
Timer m_timer;
|
||||
};
|
||||
|
||||
} // namespace frc2
|
||||
|
||||
Reference in New Issue
Block a user