DeepSpace  2019
ControlLight.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_Light);
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  if(this->pJoyOp->GetYButton()){
17  Robot::m_Light->On();
18  }else{
20  }
21 }
22 
23 
24 bool ControlLight::IsFinished() { return false; }
25 
26 // Called once after isFinished returns true
28 
29 // Called when another command which requires one or more of the same
30 // subsystems is scheduled to run
void On()
Definition: Light.cpp:11
frc::XboxController * GetJoystickOperator(void)
Definition: OI.cpp:14
void Interrupted() override
Runs once if the command is forced to stop.
ControlLight()
Class constructor.
Definition: ControlLight.cpp:4
void End() override
Runs once when IsFinished() returns true.
void Execute() override
Called in a loop during Teleop.
bool IsFinished() override
void Off()
Definition: Light.cpp:15
void Initialize() override
Runs once on initalization.
static OI * m_oi
Pointer for the Operator Interface (OI)
Definition: Robot.h:68
frc::XboxController * pJoyOp
Definition: ControlLight.h:22
static Light * m_Light
Pointer for the Light.
Definition: Robot.h:72