View Single Post
  #2   Spotlight this post!  
Unread 10-01-2012, 17:38
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,576
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: Output not updated enough

Quote:
Originally Posted by krudeboy51 View Post
Code:
    public void operatorControl() {
        while(isEnabled() && isAutonomous()){
            Drive.setSafetyEnabled(true);
            Drive.arcadeDrive(stick);
            Timer.delay(0.0004);
        }

    }
Your code isn't getting called. Your isAutonomous should be isOperatorControl.

Your delay is also very short, only 400 microseconds. The motors will only be updated at 5 ms, so use a delay of at least 0.005. You only get new joystick data every 20ms, so if you're only doing operator control, you can have a delay of 0.02
Reply With Quote