Re: Joystick Axis Input Not Working
I'm having the same problem and i cant seem to find the Solution.
I have tried old code and the Joysticks worked fine but after i copied it didnt work still. The i created a test program (Below) and that also didn't work.
SO CONFUSED
Code:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.*;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the SimpleRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class RobotTemplate extends SimpleRobot {
public Joystick Joy = new Joystick(1);
public Jaguar Jag_One = new Jaguar(1,1);
public Jaguar Jag_Two = new Jaguar(1,2);
public Jaguar Jag_Three = new Jaguar(1,3);
public Jaguar Jag_Four = new Jaguar(1,4);
public void autonomous() {
}
/**
* This function is called once each time the robot enters operator control.
*/
public void operatorControl() {
Jag_One.set(Joy.getY());
Jag_Two.set(Joy.getY());
Jag_Three.set(Joy.getY());
Jag_Four.set(Joy.getY());
}
/**
* This function is called once each time the robot enters test mode.
*/
public void test() {
}
}
__________________
2011- Programmer, Electrical, and Web
Cleveland Regional
2012- Head Programmer, Web, Driver
Pittsburg Regional, Saint Louis International
2013- Head Programmer
Cinnicinatti Regional, Taraho Regional
Last edited by 279 EMPIE : 05-02-2013 at 19:26.
|