Improve command decorator names (#1945)

This commit is contained in:
Oblarg
2019-10-19 11:13:33 -04:00
committed by Peter Johnson
parent a38f183a98
commit 53816155ba
18 changed files with 47 additions and 46 deletions

View File

@@ -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();
});

View File

@@ -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;
}));

View File

@@ -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;
});