-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommandBase.cpp
45 lines (36 loc) · 1.96 KB
/
CommandBase.cpp
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
#include "CommandBase.h"
#include "Commands/Scheduler.h"
#include "Robotmap.h" // Need to include for the port defines
CommandBase::CommandBase(const char *name) : Command(name) {
}
CommandBase::CommandBase() : Command() {
}
// Initialize a single static instance of all of your subsystems to NULL
ConfigSubsystem * CommandBase::configSubsystem = NULL;
CameraSubsystem * CommandBase::cameraSubsystem = NULL;
CameraLEDsSubsystem * CommandBase::cameraLEDsSubsystem = NULL;
Wheels * CommandBase::wheels = NULL;
OI * CommandBase::oi = NULL;
ShooterWheel * CommandBase::shooterWheel = NULL;
PanSubsystem * CommandBase::pan = NULL;
TiltSubsystem * CommandBase::tilt = NULL;
Feeder * CommandBase::feeder = NULL;
Gyro * CommandBase::chassisGyro = NULL;
Gyro * CommandBase::susanGyro = NULL;
void CommandBase::init() {
printf("-- CommandBase::init() --\n");
// Create a single static instance of all of your subsystems. The following
// line should be repeated for each subsystem in the project.
wheels = new Wheels(DRIVE_FRONT_LEFT_CHANNEL, DRIVE_FRONT_RIGHT_CHANNEL,
DRIVE_BACK_LEFT_CHANNEL, DRIVE_BACK_RIGHT_CHANNEL);
shooterWheel = new ShooterWheel(THROWER_MOTOR_CHANNEL);
configSubsystem = new ConfigSubsystem();
cameraSubsystem = new CameraSubsystem();
cameraLEDsSubsystem = new CameraLEDsSubsystem();
pan = new PanSubsystem(TURNER_MOTOR_CHANNEL);
tilt = new TiltSubsystem(TILTER_MOTOR_CHANNEL);
feeder = new Feeder(FEEDER_MOTOR_CHANNEL);
chassisGyro = new Gyro(CHASSIS_GYRO_CHANNEL); // Analog 1
susanGyro = new Gyro(SUSAN_GYRO_CHANNEL); // Analog 2
oi = new OI();
}