Changed joystick port numbers to be zero-based for C++ and Java.

Change-Id: Ifd55e8654be3b15abbe7460d2e9e6fff8acd9977
This commit is contained in:
Brad Miller
2014-10-01 11:25:51 -04:00
parent 7e2c68214d
commit 1cef27134e
11 changed files with 26 additions and 22 deletions

View File

@@ -19,7 +19,7 @@ OI::OI() {
SmartDashboard::PutData("Open Claw", new OpenClaw());
SmartDashboard::PutData("Close Claw", new CloseClaw());
joy= new Joystick(1);
joy= new Joystick(0);
// Create some buttons

View File

@@ -11,7 +11,7 @@ class Robot: public IterativeRobot
public:
Robot() :
myRobot(0, 1), // these must be initialized in the same order
stick(1), // as they are declared above.
stick(0), // as they are declared above.
lw(NULL),
autoLoopCounter(0)
{

View File

@@ -10,7 +10,7 @@
#include "Commands/SetCollectionSpeed.h"
OI::OI() {
joystick = new Joystick(1);
joystick = new Joystick(0);
R1 = new JoystickButton(joystick, 12);
R1->WhenPressed(new LowGoal());

View File

@@ -18,7 +18,7 @@ class Robot: public SampleRobot
public:
Robot() :
myRobot(0, 1), // these must be initialized in the same order
stick(1) // as they are declared above.
stick(0) // as they are declared above.
{
myRobot.SetExpiration(0.1);
}

View File

@@ -12,7 +12,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
* interface to the commands and command groups that allow control of the robot.
*/
public class OI {
private Joystick joy = new Joystick(1);
private Joystick joy = new Joystick(0);
public OI() {
// Put Some buttons on the SmartDashboard

View File

@@ -23,7 +23,7 @@ public class Robot extends IterativeRobot {
*/
public void robotInit() {
myRobot = new RobotDrive(0,1);
stick = new Joystick(1);
stick = new Joystick(0);
}
/**

View File

@@ -23,7 +23,7 @@ public class OI {
public Joystick joystick;
public OI() {
joystick = new Joystick(1);
joystick = new Joystick(0);
new JoystickButton(joystick, 12).whenPressed(new LowGoal());
new JoystickButton(joystick, 10).whenPressed(new Collect());

View File

@@ -30,7 +30,7 @@ public class Robot extends SampleRobot {
public Robot() {
myRobot = new RobotDrive(0, 1);
myRobot.setExpiration(0.1);
stick = new Joystick(1);
stick = new Joystick(0);
}
/**