frccpptest/src/main/cpp/commands/Eject.cpp
2022-08-08 08:39:35 -04:00

30 lines
802 B
C++

// 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.
#include "commands/Eject.h"
Eject::Eject(Gatherer &gatherer) :
m_gatherer(gatherer) {
// Use addRequirements() here to declare subsystem dependencies.
SetName("Eject");
AddRequirements(&m_gatherer);
}
// Called when the command is initially scheduled.
void Eject::Initialize() {
m_gatherer.eject();
}
// Called repeatedly when this Command is scheduled to run
void Eject::Execute() {}
// Called once the command ends or is interrupted.
void Eject::End(bool interrupted) {
m_gatherer.stop();
}
// Returns true when the command should end.
bool Eject::IsFinished() {
return false;
}