mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Improve command decorator names (#1945)
This commit is contained in:
@@ -63,7 +63,7 @@ class RobotContainer {
|
||||
// speed)
|
||||
.WithTimeout(ac::kAutoTimeoutSeconds)
|
||||
// When the command ends, turn off the shooter and the feeder
|
||||
.WhenFinished([this] {
|
||||
.AndThen([this] {
|
||||
m_shooter.Disable();
|
||||
m_shooter.StopFeeder();
|
||||
});
|
||||
|
||||
@@ -19,7 +19,7 @@ ComplexAuto::ComplexAuto(DriveSubsystem* drive, HatchSubsystem* hatch) {
|
||||
frc2::StartEndCommand([drive] { drive->ArcadeDrive(kAutoDriveSpeed, 0); },
|
||||
[drive] { drive->ArcadeDrive(0, 0); }, {drive})
|
||||
.BeforeStarting([drive] { drive->ResetEncoders(); })
|
||||
.InterruptOn([drive] {
|
||||
.WithInterrupt([drive] {
|
||||
return drive->GetAverageEncoderDistance() >=
|
||||
kAutoDriveDistanceInches;
|
||||
}),
|
||||
@@ -30,7 +30,7 @@ ComplexAuto::ComplexAuto(DriveSubsystem* drive, HatchSubsystem* hatch) {
|
||||
[drive] { drive->ArcadeDrive(-kAutoDriveSpeed, 0); },
|
||||
[drive] { drive->ArcadeDrive(0, 0); }, {drive})
|
||||
.BeforeStarting([drive] { drive->ResetEncoders(); })
|
||||
.InterruptOn([drive] {
|
||||
.WithInterrupt([drive] {
|
||||
return drive->GetAverageEncoderDistance() <=
|
||||
kAutoBackupDistanceInches;
|
||||
}));
|
||||
|
||||
@@ -52,7 +52,7 @@ class RobotContainer {
|
||||
[this] { m_drive.ArcadeDrive(ac::kAutoDriveSpeed, 0); },
|
||||
[this] { m_drive.ArcadeDrive(0, 0); }, {&m_drive})
|
||||
.BeforeStarting([this] { m_drive.ResetEncoders(); })
|
||||
.InterruptOn([this] {
|
||||
.WithInterrupt([this] {
|
||||
return m_drive.GetAverageEncoderDistance() >=
|
||||
ac::kAutoDriveDistanceInches;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user