-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTeam3499Robot.cpp
More file actions
64 lines (50 loc) · 1.63 KB
/
Copy pathTeam3499Robot.cpp
File metadata and controls
64 lines (50 loc) · 1.63 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
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "WPILib.h"
#include "Commands/Command.h"
#include "Commands/ExampleCommand.h"
#include "Commands/CameraLEDsBlink.h"
#include "AutonomousCommands/AutonomousCommand.h"
#include "CommandBase.h"
class Team3499Robot : public IterativeRobot {
private:
Command * autonomousCommand;
Command * blinkCommand;
Command * cameraTestCommand;
LiveWindow *lw;
virtual void RobotInit() {
CommandBase::init();
autonomousCommand = new AutonomousCommand(0x0C);
blinkCommand = new CameraLEDsBlink();
lw = LiveWindow::GetInstance();
CommandBase::cameraLEDsSubsystem->GreenOff();
CommandBase::cameraLEDsSubsystem->BlueOff();
}
virtual void DisabledInit() {
CommandBase::cameraLEDsSubsystem->GreenOff();
CommandBase::cameraLEDsSubsystem->BlueOff();
}
virtual void DisabledPeriodic() {
}
virtual void AutonomousInit() {
autonomousCommand->Start();
}
virtual void AutonomousPeriodic() {
Scheduler::GetInstance()->Run();
}
virtual void TeleopInit() {
// This makes sure that the autonomous stops running when
// teleop starts running. If you want the autonomous to
// continue until interrupted by another command, remove
// this line or comment it out.
autonomousCommand->Cancel();
printf("\n-- --\n");
printf("-- Teleop Hit --\n");
printf("-- --\n\n");
}
virtual void TeleopPeriodic() {
Scheduler::GetInstance()->Run();
}
virtual void TestPeriodic() {
lw->Run();
}
};
START_ROBOT_CLASS(Team3499Robot);