View Single Post
  #2   Spotlight this post!  
Unread 08-02-2010, 16:14
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: REMINDER : NetBeans not talk to the CRIO

There are a few problems here. It looks like the NullPointerException is from trying to feed the Watchdog incorrectly. "wd" is never assigned. Remove your Watchdog object and feed the Watchdog like this instead:

Code:
Watchdog.getInstance().feed();
The code in your operatorControl() method is only going to be called once. You need to place it in a loop, like this:

Code:
public void operatorControl()
{
    while (isEnabled() && isOperatorControl())
    {
        Watchdog.getInstance.feed();
        
         // operator control here
    }
}
You might also want to add in a small delay at the end of the loop body, since driver station input only comes in at 50Hz. There's not much of a point in reading input faster than that.
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award
Reply With Quote