mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
39 lines
845 B
C++
39 lines
845 B
C++
|
#include "WPILib.h"
|
||
|
#include "Commands/Drive.h"
|
||
|
#include "Commands/Collect.h"
|
||
|
#include "Commands/Eject.h"
|
||
|
#include "Commands/Raise.h"
|
||
|
#include "Commands/Lower.h"
|
||
|
class DentRobot: public IterativeRobot {
|
||
|
private:
|
||
|
Command *autonomousCommand = NULL;
|
||
|
LiveWindow *lw;
|
||
|
void RobotInit() {
|
||
|
CommandBase::init();
|
||
|
lw = LiveWindow::GetInstance();
|
||
|
}
|
||
|
void DisabledPeriodic() {
|
||
|
Scheduler::GetInstance()->Run();
|
||
|
}
|
||
|
void AutonomousInit() {
|
||
|
if(autonomousCommand != NULL) {
|
||
|
autonomousCommand->Start();
|
||
|
}
|
||
|
}
|
||
|
void AutonomousPeriodic() {
|
||
|
Scheduler::GetInstance()->Run();
|
||
|
}
|
||
|
void TeleopInit() {
|
||
|
if(autonomousCommand != NULL) {
|
||
|
autonomousCommand->Cancel();
|
||
|
}
|
||
|
}
|
||
|
void TeleopPeriodic() {
|
||
|
Scheduler::GetInstance()->Run();
|
||
|
}
|
||
|
void TestPeriodic() {
|
||
|
lw->Run();
|
||
|
}
|
||
|
};
|
||
|
START_ROBOT_CLASS(DentRobot);
|