DeepSpace  2019
Piston.cpp
Go to the documentation of this file.
1 #include "Subsystems/Piston.h"
2 
3 Piston::Piston() : frc::Subsystem("Piston") {
4  this->pSolenoid = new frc::Solenoid(PCM_CAN_ID, PISTON_ID);
5 }
6 
8  SetDefaultCommand(new ControlSlider());
9 }
10 
12  this->pSolenoid->Set(true);
13 }
14 
16  this->pSolenoid->Set(false);
17 }
void InitDefaultCommand() override
Initalizes the default command for this subsystem (ControlPiston)
Definition: Piston.cpp:7
#define PISTON_ID
Definition: RobotMap.h:89
frc::Solenoid * pSolenoid
Pointer to Solenoid.
Definition: Piston.h:18
#define PCM_CAN_ID
Definition: RobotMap.h:87
void Deploy()
Deploy the piston.
Definition: Piston.cpp:11
void Retract()
Retract the piston.
Definition: Piston.cpp:15
Piston()
Class constructor.
Definition: Piston.cpp:3
An interface command for driving the robot with an xbox controller.
Definition: ControlSlider.h:12