mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[commands] Add C++ Requirements struct (#5504)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
CloseClaw::CloseClaw(Claw& claw) : m_claw(&claw) {
|
||||
SetName("CloseClaw");
|
||||
AddRequirements({m_claw});
|
||||
AddRequirements(m_claw);
|
||||
}
|
||||
|
||||
// Called just before this Command runs the first time
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
OpenClaw::OpenClaw(Claw& claw)
|
||||
: frc2::CommandHelper<frc2::WaitCommand, OpenClaw>(1_s), m_claw(&claw) {
|
||||
SetName("OpenClaw");
|
||||
AddRequirements({m_claw});
|
||||
AddRequirements(m_claw);
|
||||
}
|
||||
|
||||
// Called just before this Command runs the first time
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
SetElevatorSetpoint::SetElevatorSetpoint(double setpoint, Elevator& elevator)
|
||||
: m_setpoint(setpoint), m_elevator(&elevator) {
|
||||
SetName("SetElevatorSetpoint");
|
||||
AddRequirements({m_elevator});
|
||||
AddRequirements(m_elevator);
|
||||
}
|
||||
|
||||
// Called just before this Command runs the first time
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
SetWristSetpoint::SetWristSetpoint(double setpoint, Wrist& wrist)
|
||||
: m_setpoint(setpoint), m_wrist(&wrist) {
|
||||
SetName("SetWristSetpoint");
|
||||
AddRequirements({m_wrist});
|
||||
AddRequirements(m_wrist);
|
||||
}
|
||||
|
||||
// Called just before this Command runs the first time
|
||||
|
||||
@@ -14,7 +14,7 @@ TankDrive::TankDrive(std::function<double()> left,
|
||||
m_right(std::move(right)),
|
||||
m_drivetrain(&drivetrain) {
|
||||
SetName("TankDrive");
|
||||
AddRequirements({m_drivetrain});
|
||||
AddRequirements(m_drivetrain);
|
||||
}
|
||||
|
||||
// Called repeatedly when this Command is scheduled to run
|
||||
|
||||
Reference in New Issue
Block a user