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
7
void
Light::InitDefaultCommand
() {
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
}
Light::On
void On()
Definition:
Light.cpp:11
ControlLight
An interface command for toggleing the gripper.
Definition:
ControlLight.h:11
LIGHT_ID
#define LIGHT_ID
Definition:
RobotMap.h:92
PCM_CAN_ID
#define PCM_CAN_ID
Definition:
RobotMap.h:87
Light.h
Light::pLight
frc::Solenoid * pLight
Pointer to Solenoid.
Definition:
Light.h:18
Light::InitDefaultCommand
void InitDefaultCommand() override
Initalizes the default command for this subsystem (ControlLight)
Definition:
Light.cpp:7
Light::Off
void Off()
Definition:
Light.cpp:15
Light::Light
Light()
Class constructor.
Definition:
Light.cpp:3
src
main
cpp
Subsystems
Light.cpp
Generated by
1.8.13