DeepSpace  2019
Flap.cpp
Go to the documentation of this file.
1 #include "Subsystems/Flap.h"
2 
3 Flap::Flap() : frc::Subsystem("Flap") {
4  this->pSolenoid = new frc::DoubleSolenoid(PCM_CAN_ID,FLAP_ID_FORWARD, FLAP_ID_REVERSE);
5 }
6 
8  SetDefaultCommand(new ControlCargo());
9 }
10 
11 void Flap::Deploy() {
12  this->pSolenoid->Set(frc::DoubleSolenoid::Value::kForward);
13 }
14 
15 void Flap::Retract() {
16  this->pSolenoid->Set(frc::DoubleSolenoid::Value::kReverse);
17 }
18 
20  this->pSolenoid->Set(frc::DoubleSolenoid::Value::kOff);
21 }
#define FLAP_ID_FORWARD
Definition: RobotMap.h:99
void Release()
Release pressure.
Definition: Flap.cpp:19
void Retract()
Retract the Flap.
Definition: Flap.cpp:15
#define PCM_CAN_ID
Definition: RobotMap.h:87
An interface command for driving the robot with an xbox controller.
Definition: ControlCargo.h:12
Flap()
Class constructor.
Definition: Flap.cpp:3
frc::DoubleSolenoid * pSolenoid
Pointer to Solenoid.
Definition: Flap.h:19
void Deploy()
Deploy the Flap.
Definition: Flap.cpp:11
void InitDefaultCommand() override
Initalizes the default command for this subsystem (ControlFlap)
Definition: Flap.cpp:7
#define FLAP_ID_REVERSE
Definition: RobotMap.h:100