mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
Removed robot test functions
This commit is contained in:
parent
a5017e701b
commit
e8f262cd8c
@ -1,38 +0,0 @@
|
||||
#include "CheckDrive.h"
|
||||
#include <cmath>
|
||||
#include "Commands/CommandGroup.h"
|
||||
#include "../../DentRobot.h"
|
||||
#include "../../RobotMap.h"
|
||||
CheckDrive::CheckDrive(int motorID): CommandGroup("CheckDrive"){
|
||||
Requires(DentRobot::drivetrain);
|
||||
motor = motorID;
|
||||
}
|
||||
void CheckDrive::Initialize(){
|
||||
SetTimeout(1.0);
|
||||
}
|
||||
void CheckDrive::Execute(){
|
||||
switch(motor){
|
||||
case DRIVE_FRONT_LEFT_CAN:
|
||||
DentRobot::drivetrain->TestMotor(DentRobot::drivetrain->FRONTLEFT, 1);
|
||||
break;
|
||||
case DRIVE_FRONT_RIGHT_CAN:
|
||||
DentRobot::drivetrain->TestMotor(DentRobot::drivetrain->FRONTRIGHT, 1);
|
||||
break;
|
||||
case DRIVE_BACK_LEFT_CAN:
|
||||
DentRobot::drivetrain->TestMotor(DentRobot::drivetrain->BACKLEFT, 1);
|
||||
break;
|
||||
case DRIVE_BACK_RIGHT_CAN:
|
||||
DentRobot::drivetrain->TestMotor(DentRobot::drivetrain->BACKRIGHT, 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
bool CheckDrive::IsFinished(){
|
||||
return false;
|
||||
}
|
||||
void CheckDrive::End(){
|
||||
}
|
||||
void CheckDrive::Interrupted(){
|
||||
End();
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
#ifndef CHECKDRIVE_H
|
||||
#define CHECKDRIVE_H
|
||||
|
||||
#include "Commands/Command.h"
|
||||
#include "../../DentRobot.h"
|
||||
#include "../../DentRobot.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
/**
|
||||
* @brief TODO
|
||||
*/
|
||||
class CheckDrive: public CommandGroup{
|
||||
private:
|
||||
int motor; //<! TODO
|
||||
public:
|
||||
/**
|
||||
* @brief TODO
|
||||
*
|
||||
* @param motorID
|
||||
*/
|
||||
CheckDrive(int);
|
||||
/**
|
||||
* @brief Initializes the class
|
||||
*/
|
||||
void Initialize();
|
||||
/**
|
||||
* @brief TODO
|
||||
*/
|
||||
void Execute();
|
||||
/**
|
||||
* @brief Checks if the command is finished
|
||||
*
|
||||
* @return TODO
|
||||
*/
|
||||
bool IsFinished();
|
||||
/**
|
||||
* @brief TODO
|
||||
*/
|
||||
void End();
|
||||
/**
|
||||
* @brief Calls End()
|
||||
*/
|
||||
void Interrupted();
|
||||
};
|
||||
#endif
|
@ -1,13 +0,0 @@
|
||||
#include "Commands/CommandGroup.h"
|
||||
#include "../../DentRobot.h"
|
||||
#include "../../RobotMap.h"
|
||||
#include "../Elevator/Raise.h"
|
||||
#include "CheckRobot.h"
|
||||
#include "CheckDrive.h"
|
||||
CheckRobot::CheckRobot(){
|
||||
AddSequential(new CheckDrive(DRIVE_FRONT_LEFT_CAN));
|
||||
AddSequential(new CheckDrive(DRIVE_FRONT_RIGHT_CAN));
|
||||
AddSequential(new CheckDrive(DRIVE_BACK_LEFT_CAN));
|
||||
AddSequential(new CheckDrive(DRIVE_BACK_RIGHT_CAN));
|
||||
}
|
||||
// vim: ts=2:sw=2:et
|
@ -1,20 +0,0 @@
|
||||
#ifndef CHECKROBOT_H
|
||||
#define CHECKROBOT_H
|
||||
|
||||
#include "Commands/CommandGroup.h"
|
||||
#include "../../DentRobot.h"
|
||||
#include "../../DentRobot.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
/**
|
||||
* @brief TODO
|
||||
*/
|
||||
class CheckRobot: public CommandGroup{
|
||||
public:
|
||||
/**
|
||||
* @brief TODO
|
||||
*/
|
||||
CheckRobot();
|
||||
};
|
||||
#endif
|
||||
// vim: ts=2:sw=2:et
|
5
OI.cpp
5
OI.cpp
@ -9,7 +9,6 @@
|
||||
#include "Commands/BinElevator/BinOpenArms.h"
|
||||
#include "Commands/Autonomous/CollectTote.h"
|
||||
#include "Commands/Autonomous/ReleaseTote.h"
|
||||
#include "Commands/Test/CheckRobot.h"
|
||||
OI::OI(){
|
||||
// Joysticks
|
||||
leftStick=new Joystick(0);
|
||||
@ -45,10 +44,6 @@ OI::OI(){
|
||||
JoystickButton *right12=new JoystickButton(rightStick, 12);
|
||||
right12->CancelWhenPressed(raise);
|
||||
right12->CancelWhenPressed(lower);
|
||||
// Basic motor test
|
||||
CheckRobot* checkRobot=new CheckRobot();
|
||||
JoystickButton *left7=new JoystickButton(leftStick, 7);
|
||||
left7->WhenPressed(checkRobot);
|
||||
}
|
||||
Joystick* OI::GetRightStick(){
|
||||
return rightStick;
|
||||
|
Loading…
Reference in New Issue
Block a user