adds button testing

This commit is contained in:
Brendan Haines 2015-05-15 21:19:33 -06:00
parent b35abe90d2
commit c09786801e
3 changed files with 51 additions and 11 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,38 +1,78 @@
#include "WPILib.h"
///// USER PARAMETERS /////
// Tuning Parameters
#define throScale 1
// Wiring Parameters
#define frontLeftChannel 3
#define backLeftChannel 4
#define frontRightChannel 1
#define backRightChannel 2
#define InterLink_Elite_ID 0
///// END USER PARAMETERS /////
class Robot: public IterativeRobot
{
private:
LiveWindow *lw;
DriverStation *ds;
// Motor Controllers
Talon *frontLeft;
Talon *backLeft;
Talon *frontRight;
Talon *backRight;
// Input Devices
Joystick *InterLink;
public:
Robot()
{
frontLeft = new Talon( frontLeftChannel );
backLeft = new Talon( backLeftChannel );
frontRight = new Talon( frontRightChannel );
backRight = new Talon( backRightChannel );
ds = DriverStation::GetInstance();
InterLink = new Joystick( InterLink_Elite_ID );
}
void RobotInit()
{
lw = LiveWindow::GetInstance();
}
void AutonomousInit()
{
//////////////////////
///// AUTONOMOUS /////
//////////////////////
}
void AutonomousInit()
{}
void AutonomousPeriodic()
{
{}
}
////////////////////////
///// TELEOPERATED /////
////////////////////////
void TeleopInit()
{
}
{}
void TeleopPeriodic()
{
{}
}
////////////////
///// TEST /////
////////////////
void TestPeriodic()
{
lw->Run();
SmartDashboard::PutBoolean( "resetButton", InterLink->GetRawButton(2) );
}
};