DeepSpace  2019
ControlHatchGripper.cpp
Go to the documentation of this file.
2 #include "Utils/EdgeLight.h"
3 #include "Robot.h"
4 
6  // Use Requires() here to declare subsystem dependencies
7  Requires(Robot::m_HatchGripper);
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  // hold onto hatch if y button is pressed
18  if(this->pJoyOp->GetYButton()) {
21  Log("Finger Down!");
22  }
23  else
24  {
26  }
27 }
28 
29 
30 bool ControlHatchGripper::IsFinished() { return false; }
31 
32 // Called once after isFinished returns true
34 
35 // Called when another command which requires one or more of the same
36 // subsystems is scheduled to run
bool IsFinished() override
frc::XboxController * GetJoystickOperator(void)
Definition: OI.cpp:14
void Deploy()
Deploy the gripper.
ControlHatchGripper()
Class constructor.
void Log(std::string message)
Main robot class that is called by wpilib.
Definition: logging.cpp:9
frc::XboxController * pJoyOp
void End() override
Runs once when IsFinished() returns true.
void TurnOff()
Turn of gripper.
void Interrupted() override
Runs once if the command is forced to stop.
void Execute() override
Called in a loop during Teleop.
static OI * m_oi
Pointer for the Operator Interface (OI)
Definition: Robot.h:68
void Retract()
Retract the gripper.
static HatchGripper * m_HatchGripper
Pointer for the Hatch Gripper.
Definition: Robot.h:70
void Append(LedColour colour)
Definition: EdgeLight.cpp:7
void Initialize() override
Runs once on initalization.