mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[commands] Remove deprecated TrapzoidProfileCommand api (#6547)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user