-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutputcommon.cpp
More file actions
50 lines (31 loc) · 1.2 KB
/
Copy pathoutputcommon.cpp
File metadata and controls
50 lines (31 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "outputcommon.h"
#include "ports.h"
DriverStationLCD *OutputCommon::dsLCD;
Operator *OutputCommon::op; // oper8shunal
DigitalInput *OutputCommon::psensor; // Digital I/O 5
ArduinoControl *OutputCommon::mainLights;
DriveSys *OutputCommon::drivesys;
CANJaguar *OutputCommon::handstilt; // For tilting the arm up and down. #63
Compressor *OutputCommon::compressor; // Relay 2, Digital I/O 2
SolenoidBreakout *OutputCommon::airsys; // Solenoids 1-8
void OutputCommon::initCommon(){
// Initialize
dsLCD = DriverStationLCD::GetInstance();
op = new Operator();
psensor = new DigitalInput(MAIN_SIDECAR, PROXIMITY_SENSOR_DIO);
mainLights = new ArduinoControl(ARDUINO_LIGHT_MODE_PWM, ARDUINO_LIGHT_COLOR_DIO);
drivesys = new DriveSys(op);
handstilt = new CANJaguar(JAGUAR_HANDS_CAN, CANJaguar::kPercentVbus);
compressor = new Compressor(MAIN_SIDECAR, COMPRESSOR_TRANSDUCER_DIO, MAIN_SIDECAR, COMPRESSOR_RELAY);
airsys = new SolenoidBreakout();
}
void OutputCommon::destroyCommon(){
delete dsLCD;
delete op;
delete psensor;
delete mainLights;
delete drivesys;
delete handstilt;
delete compressor;
delete airsys;
}