mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[commands] Fix and deprecate TrapezoidProfileCommand (#6722)
This commit is contained in:
@@ -119,16 +119,6 @@
|
||||
"replacename": "ReplaceMeSubsystem",
|
||||
"commandversion": 2
|
||||
},
|
||||
{
|
||||
"name": "TrapezoidProfileCommand",
|
||||
"description": "A command that executes a trapezoidal motion profile.",
|
||||
"tags": [
|
||||
"trapezoidprofilecommand"
|
||||
],
|
||||
"foldername": "trapezoidprofilecommand",
|
||||
"replacename": "ReplaceMeTrapezoidProfileCommand",
|
||||
"commandversion": 2
|
||||
},
|
||||
{
|
||||
"name": "TrapezoidProfileSubsystem",
|
||||
"description": "A subsystem that executes a trapezoidal motion profile.",
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
package edu.wpi.first.wpilibj.commands.trapezoidprofilecommand;
|
||||
|
||||
import edu.wpi.first.math.trajectory.TrapezoidProfile;
|
||||
import edu.wpi.first.wpilibj2.command.TrapezoidProfileCommand;
|
||||
|
||||
// NOTE: Consider using this command inline, rather than writing a subclass. For more
|
||||
// information, see:
|
||||
// https://docs.wpilib.org/en/stable/docs/software/commandbased/convenience-features.html
|
||||
public class ReplaceMeTrapezoidProfileCommand extends TrapezoidProfileCommand {
|
||||
/** Creates a new ReplaceMeTrapezoidProfileCommand. */
|
||||
public ReplaceMeTrapezoidProfileCommand() {
|
||||
super(
|
||||
// The motion profile to be executed
|
||||
new TrapezoidProfile(
|
||||
// The motion profile constraints
|
||||
new TrapezoidProfile.Constraints(0, 0)),
|
||||
state -> {
|
||||
// Use current trajectory state here
|
||||
},
|
||||
// Goal state
|
||||
TrapezoidProfile.State::new,
|
||||
// Current state
|
||||
TrapezoidProfile.State::new);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user