Remove unused code and generic comment
This commit is contained in:
parent
fbf547f536
commit
7422635b49
@ -43,8 +43,6 @@ class Robot: public IterativeRobot
|
|||||||
RobotDrive drive;
|
RobotDrive drive;
|
||||||
Shooter shooter;
|
Shooter shooter;
|
||||||
Joystick driver_stick, operator_stick;
|
Joystick driver_stick, operator_stick;
|
||||||
//DriverStation DriverStation::GetInstance();
|
|
||||||
//float power;
|
|
||||||
public:
|
public:
|
||||||
Robot():
|
Robot():
|
||||||
left_drive(0), // Left DriveTrain Talons plug into PWM channel 1 with a Y-splitter
|
left_drive(0), // Left DriveTrain Talons plug into PWM channel 1 with a Y-splitter
|
||||||
@ -79,20 +77,6 @@ private:
|
|||||||
const std::string autoNameCustom = "My Auto";
|
const std::string autoNameCustom = "My Auto";
|
||||||
std::string autoSelected;
|
std::string autoSelected;
|
||||||
|
|
||||||
/*void LogData()
|
|
||||||
{
|
|
||||||
static PowerDistributionPanel pdp;
|
|
||||||
static DriverStation DriverStation::GetInstance() = DriverStation::GetInstance();
|
|
||||||
static std::vector<CANTalon*> motors;
|
|
||||||
|
|
||||||
static std::ofstream logA, logB, logC;
|
|
||||||
timeval tm;
|
|
||||||
|
|
||||||
SmartDashboard::PutBoolean("log A", logA.is_open());
|
|
||||||
SmartDashboard::PutBoolean("log B", logB.is_open());
|
|
||||||
SmartDashboard::PutBoolean("log C", logC.is_open());
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void RobotInit()
|
void RobotInit()
|
||||||
{
|
{
|
||||||
chooser = new SendableChooser();
|
chooser = new SendableChooser();
|
||||||
@ -115,16 +99,6 @@ private:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This autonomous (along with the chooser code above) shows how to select between different autonomous modes
|
|
||||||
* using the dashboard. The sendable chooser code works with the Java SmartDashboard. If you prefer the LabVIEW
|
|
||||||
* Dashboard, remove all of the chooser code and uncomment the GetString line to get the auto name from the text box
|
|
||||||
* below the Gyro
|
|
||||||
*
|
|
||||||
* You can add additional auto modes by adding additional comparisons to the if-else structure below with additional strings.
|
|
||||||
* If using the SendableChooser make sure to add them to the chooser code above as well.
|
|
||||||
*/
|
|
||||||
void AutonomousInit()
|
void AutonomousInit()
|
||||||
{
|
{
|
||||||
autoSelected = *((std::string*)chooser->GetSelected());
|
autoSelected = *((std::string*)chooser->GetSelected());
|
||||||
@ -402,27 +376,6 @@ private:
|
|||||||
LOG(std::endl);
|
LOG(std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimpleDrive()
|
|
||||||
{
|
|
||||||
float x = -driver_stick.GetX();
|
|
||||||
float y = -driver_stick.GetY();
|
|
||||||
float left = 0;
|
|
||||||
float right = 0;
|
|
||||||
|
|
||||||
if (x > 0)
|
|
||||||
{
|
|
||||||
right = y;
|
|
||||||
left = (1- x*TURN_FACTOR)*y ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
left = y;
|
|
||||||
right = (1+x*TURN_FACTOR)*y;
|
|
||||||
}
|
|
||||||
|
|
||||||
drive.TankDrive(left, right);
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateDrive()
|
void UpdateDrive()
|
||||||
{
|
{
|
||||||
float x = -driver_stick.GetX();
|
float x = -driver_stick.GetX();
|
||||||
|
Reference in New Issue
Block a user