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 "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() {
#include "DentRobot.h"
DentRobot::DentRobot():
driveCommand(new Drive()){
printf("Initialized");
}
void DentRobot::RobotInit(){
printf("Initializing");
CommandBase::init();
lw = LiveWindow::GetInstance();
}
void DisabledPeriodic() {
}
void DentRobot::DisabledPeriodic(){
Scheduler::GetInstance()->Run();
}
void AutonomousInit() {
if(autonomousCommand != NULL) {
autonomousCommand->Start();
}
}
void AutonomousPeriodic() {
}
void DentRobot::AutonomousInit(){
}
void DentRobot::AutonomousPeriodic(){
Scheduler::GetInstance()->Run();
}
void TeleopInit() {
if(autonomousCommand != NULL) {
autonomousCommand->Cancel();
}
}
void TeleopPeriodic() {
}
void DentRobot::TeleopInit(){
}
void DentRobot::TeleopPeriodic(){
Scheduler::GetInstance()->Run();
}
void TestPeriodic() {
lw->Run();
}
};
}
void DentRobot::TestPeriodic(){
}
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