diff --git a/src/DentRobot.cpp b/src/DentRobot.cpp index 6d89f15..f34e638 100644 --- a/src/DentRobot.cpp +++ b/src/DentRobot.cpp @@ -1,38 +1,25 @@ -#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(); - } -}; +#include "DentRobot.h" +DentRobot::DentRobot(): + driveCommand(new Drive()){ + printf("Initialized"); +} +void DentRobot::RobotInit(){ + printf("Initializing"); + CommandBase::init(); +} +void DentRobot::DisabledPeriodic(){ + Scheduler::GetInstance()->Run(); +} +void DentRobot::AutonomousInit(){ +} +void DentRobot::AutonomousPeriodic(){ + Scheduler::GetInstance()->Run(); +} +void DentRobot::TeleopInit(){ +} +void DentRobot::TeleopPeriodic(){ + Scheduler::GetInstance()->Run(); +} +void DentRobot::TestPeriodic(){ +} START_ROBOT_CLASS(DentRobot); diff --git a/src/DentRobot.h b/src/DentRobot.h new file mode 100644 index 0000000..2ec1f47 --- /dev/null +++ b/src/DentRobot.h @@ -0,0 +1,23 @@ +#ifndef DENTROBOT_H +#define DENTROBOT_H +#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 *driveCommand = NULL; +public: + DentRobot(); + void RobotInit(); + void DisabledPeriodic(); + void AutonomousInit(); + void AutonomousPeriodic(); + void TeleopInit(); + void TeleopPeriodic(); + void TestPeriodic(); +}; +#endif +// vim: ts=2:sw=2:et