DeepSpace  2019
ControlCargo.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_Flap);
8 }
9 
10 // Called just before this Command runs the first time
11 // aka: every time teleop is enabled
13 
14 // Called repeatedly when this Command is scheduled to run
16 
17  // Control piston
18  if(this->pJoyDrive->GetAButton()){
20  }else{
22  }
23 
24 }
25 
26 
27 bool ControlCargo::IsFinished() { return false; }
28 
29 // Called once after isFinished returns true
31 
32 // Called when another command which requires one or more of the same
33 // subsystems is scheduled to run
void Execute() override
Called in a loop during Teleop.
void Retract()
Retract the Flap.
Definition: Flap.cpp:15
ControlCargo()
Class constructor.
Definition: ControlCargo.cpp:4
frc::XboxController * pJoyDrive
A mnemonic for the operator's controller because we are lazy.
Definition: ControlCargo.h:30
static Flap * m_Flap
Pointer for the Cargo Flap.
Definition: Robot.h:71
bool IsFinished() override
void End() override
Runs once when IsFinished() returns true.
void Initialize() override
Runs once on initalization.
frc::XboxController * GetJoystickDrive(void)
Definition: OI.cpp:10
static OI * m_oi
Pointer for the Operator Interface (OI)
Definition: Robot.h:68
void Deploy()
Deploy the Flap.
Definition: Flap.cpp:11
void Interrupted() override
Runs once if the command is forced to stop.