[commands] Remove deprecated TrapzoidProfileCommand api (#6547)

This commit is contained in:
Isaac Turner
2024-04-28 12:07:23 +08:00
committed by GitHub
parent a42ffb8fa4
commit d9eb3691d8
2 changed files with 1 additions and 52 deletions

View File

@@ -52,28 +52,6 @@ class TrapezoidProfileCommand
m_goal(goal),
m_currentState(currentState) {
this->AddRequirements(requirements);
m_newAPI = true;
}
/**
* Creates a new TrapezoidProfileCommand that will execute the given
* TrapezoidalProfile. Output will be piped to the provided consumer function.
*
* @param profile The motion profile to execute.
* @param output The consumer for the profile output.
* @param requirements The list of requirements.
* @deprecated The new constructor allows you to pass in a supplier for
* desired and current state. This allows you to change goals at runtime.
*/
[[deprecated(
"The new constructor allows you to pass in a supplier for desired and "
"current state. This allows you to change goals at runtime.")]]
TrapezoidProfileCommand(frc::TrapezoidProfile<Distance> profile,
std::function<void(State)> output,
Requirements requirements = {})
: m_profile(profile), m_output(output) {
this->AddRequirements(requirements);
m_newAPI = false;
}
void Initialize() override { m_timer.Restart(); }
@@ -93,7 +71,6 @@ class TrapezoidProfileCommand
std::function<void(State)> m_output;
std::function<State()> m_goal;
std::function<State()> m_currentState;
bool m_newAPI; // TODO: Remove
frc::Timer m_timer;
};