View Single Post
  #11   Spotlight this post!  
Unread 05-02-2013, 19:33
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Joystick Axis Input Not Working

Quote:
Originally Posted by 279 EMPIE View Post
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:
public class RobotTemplate extends SimpleRobot {
.
.
.    
    /**
     * 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());
        
    }
Your code is extending SimpleRobot, but your operatorControl method doesn't have a loop in it. It is getting called once, and never again (until you disable and re-enable it. If you want to use SimpleRobot, you need to have a loop in OperatorControl. See http://wpilib.screenstepslive.com/s/...ot-programming Or, you need to be using IterativeRobot instead of SimpleRobot.
Reply With Quote