2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00

Added DentRobot.h

This commit is contained in:
Austen Adler 2015-01-16 19:49:16 -05:00
parent 180884bfe7
commit 0036f2dd7a
2 changed files with 47 additions and 37 deletions

View File

@ -1,38 +1,25 @@
#include "WPILib.h" #include "DentRobot.h"
#include "Commands/Drive.h" DentRobot::DentRobot():
#include "Commands/Collect.h" driveCommand(new Drive()){
#include "Commands/Eject.h" printf("Initialized");
#include "Commands/Raise.h" }
#include "Commands/Lower.h" void DentRobot::RobotInit(){
class DentRobot: public IterativeRobot { printf("Initializing");
private: CommandBase::init();
Command *autonomousCommand = NULL; }
LiveWindow *lw; void DentRobot::DisabledPeriodic(){
void RobotInit() { Scheduler::GetInstance()->Run();
CommandBase::init(); }
lw = LiveWindow::GetInstance(); void DentRobot::AutonomousInit(){
} }
void DisabledPeriodic() { void DentRobot::AutonomousPeriodic(){
Scheduler::GetInstance()->Run(); Scheduler::GetInstance()->Run();
} }
void AutonomousInit() { void DentRobot::TeleopInit(){
if(autonomousCommand != NULL) { }
autonomousCommand->Start(); void DentRobot::TeleopPeriodic(){
} Scheduler::GetInstance()->Run();
} }
void AutonomousPeriodic() { void DentRobot::TestPeriodic(){
Scheduler::GetInstance()->Run(); }
}
void TeleopInit() {
if(autonomousCommand != NULL) {
autonomousCommand->Cancel();
}
}
void TeleopPeriodic() {
Scheduler::GetInstance()->Run();
}
void TestPeriodic() {
lw->Run();
}
};
START_ROBOT_CLASS(DentRobot); START_ROBOT_CLASS(DentRobot);

23
src/DentRobot.h Normal file
View File

@ -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