2015-01-16 19:49:16 -05:00
|
|
|
#include "DentRobot.h"
|
2015-02-07 12:32:46 -05:00
|
|
|
#include "Commands/Autonomous/Autonomous.h"
|
2015-01-17 12:21:16 -05:00
|
|
|
OI* DentRobot::oi=NULL;
|
|
|
|
Collector* DentRobot::collector=NULL;
|
|
|
|
Drivetrain* DentRobot::drivetrain=NULL;
|
|
|
|
Elevator* DentRobot::elevator=NULL;
|
2015-02-07 12:32:46 -05:00
|
|
|
AirCompressor* DentRobot::airCompressor=NULL;
|
2015-02-07 12:50:36 -05:00
|
|
|
CommandGroup* DentRobot::aut=NULL;
|
2015-01-17 12:21:16 -05:00
|
|
|
DentRobot::DentRobot(){
|
|
|
|
oi=new OI();
|
|
|
|
collector=new Collector();
|
|
|
|
drivetrain=new Drivetrain();
|
|
|
|
elevator=new Elevator();
|
2015-01-20 07:02:46 -05:00
|
|
|
airCompressor=new AirCompressor();
|
2015-02-07 12:32:46 -05:00
|
|
|
aut=new Autonomous();
|
2015-01-16 19:49:16 -05:00
|
|
|
printf("Initialized");
|
|
|
|
}
|
|
|
|
void DentRobot::RobotInit(){
|
2015-02-07 07:23:10 -05:00
|
|
|
SmartDashboard::PutNumber("CodeVersion",0.001);
|
2015-01-16 19:49:16 -05:00
|
|
|
}
|
|
|
|
void DentRobot::DisabledPeriodic(){
|
|
|
|
Scheduler::GetInstance()->Run();
|
|
|
|
}
|
|
|
|
void DentRobot::AutonomousInit(){
|
2015-02-07 12:32:46 -05:00
|
|
|
if(aut != NULL){
|
|
|
|
aut->Start();
|
|
|
|
}
|
2015-01-16 19:49:16 -05:00
|
|
|
}
|
|
|
|
void DentRobot::AutonomousPeriodic(){
|
|
|
|
Scheduler::GetInstance()->Run();
|
|
|
|
}
|
|
|
|
void DentRobot::TeleopInit(){
|
2015-02-07 12:32:46 -05:00
|
|
|
//if (aut != NULL){
|
|
|
|
// aut->Cancel();
|
|
|
|
//}
|
2015-01-16 19:49:16 -05:00
|
|
|
}
|
|
|
|
void DentRobot::TeleopPeriodic(){
|
|
|
|
Scheduler::GetInstance()->Run();
|
|
|
|
}
|
|
|
|
void DentRobot::TestPeriodic(){
|
|
|
|
}
|
2015-01-11 16:02:49 -05:00
|
|
|
START_ROBOT_CLASS(DentRobot);
|