DeepSpace  2019
Light.cpp
Go to the documentation of this file.
1 #include "Subsystems/Light.h"
2 
3 Light::Light() : frc::Subsystem("Light") {
4  this->pLight = new frc::Solenoid(PCM_CAN_ID, LIGHT_ID);
5 }
6 
8  SetDefaultCommand(new ControlLight());
9 }
10 
11 void Light::On() {
12  this->pLight->Set(true);
13 }
14 
15 void Light::Off() {
16  this->pLight->Set(false);
17 }
void On()
Definition: Light.cpp:11
An interface command for toggleing the gripper.
Definition: ControlLight.h:11
#define LIGHT_ID
Definition: RobotMap.h:92
#define PCM_CAN_ID
Definition: RobotMap.h:87
frc::Solenoid * pLight
Pointer to Solenoid.
Definition: Light.h:18
void InitDefaultCommand() override
Initalizes the default command for this subsystem (ControlLight)
Definition: Light.cpp:7
void Off()
Definition: Light.cpp:15
Light()
Class constructor.
Definition: Light.cpp:3