DeepSpace  2019
ControlCompressor.cpp
Go to the documentation of this file.
2 #include "Robot.h"
3 
5  // Use Requires() here to declare subsystem dependencies
6  Requires(Robot::m_cCompressor);
9 }
10 
11 // Called just before this Command runs the first time
12 // aka: every time teleop is enabled
14 
15 // Called repeatedly when this Command is scheduled to run
17  // Enable on start button
18  if(this->pJoyDrive->GetStartButtonReleased() || this->pJoyOp->GetStartButtonReleased()){
20  }
21 
22  // Disable on back button
23  if(this->pJoyDrive->GetBackButtonReleased() || this->pJoyOp->GetBackButtonReleased()){
25  }
26 }
27 
28 
29 bool ControlCompressor::IsFinished() { return false; }
30 
31 // Called once after isFinished returns true
33 
34 // Called when another command which requires one or more of the same
35 // subsystems is scheduled to run
void Initialize() override
Runs once on initalization.
void SetState(bool enabled)
Definition: Compressor.cpp:14
frc::XboxController * GetJoystickOperator(void)
Definition: OI.cpp:14
ControlCompressor()
Class constructor.
static cCompressor * m_cCompressor
Pointer for the cCompressor.
Definition: Robot.h:62
void Interrupted() override
Runs once if the command is forced to stop.
bool IsFinished() override
void Execute() override
Called in a loop during Teleop.
frc::XboxController * pJoyOp
A mnemonic for the operator's controller.
frc::XboxController * GetJoystickDrive(void)
Definition: OI.cpp:10
static OI * m_oi
Pointer for the Operator Interface (OI)
Definition: Robot.h:68
void End() override
Runs once when IsFinished() returns true.
frc::XboxController * pJoyDrive
A mnemonic for the driver's controller.