DeepSpace  2019
Compressor.cpp
Go to the documentation of this file.
2 #include <iostream>
3 
4 cCompressor::cCompressor() : frc::Subsystem("cCompressor") {
5  // Initialize the motors
6  this->pCompressor = new frc::Compressor(PCM_CAN_ID);
7  this->pCompressor->SetClosedLoopControl(false);
8 }
9 
11  SetDefaultCommand(new ControlCompressor());
12 }
13 
14 void cCompressor::SetState(bool enabled){
15  std::cout << "Compressor set to: " << enabled << std::endl;
16  this->pCompressor->SetClosedLoopControl(enabled);
17 }
void SetState(bool enabled)
Definition: Compressor.cpp:14
frc::Compressor * pCompressor
Definition: Compressor.h:23
void InitDefaultCommand() override
Initalizes the default command for this subsystem (DriveWithJoystick)
Definition: Compressor.cpp:10
#define PCM_CAN_ID
Definition: RobotMap.h:87
An interface command for driving the robot with an xbox controller.
cCompressor()
Class constructor.
Definition: Compressor.cpp:4