Thread: Using WPILib
View Single Post
  #1   Spotlight this post!  
Unread 19-01-2008, 16:12
RyanW RyanW is offline
Registered User
FRC #0449 (Blair Robot Project)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: MD
Posts: 40
RyanW has a spectacular aura aboutRyanW has a spectacular aura about
Using WPILib

To get our Ultrasonic sensor to work properly, our team started using WPILib. It works great, and we've also managed to successfully port our four different drive methods. However, I have some concerns about the autonomous period. So far, it looks like that method Autonomous() is only called once. First of all, is this the case, and should it be working that way? If not, is it a hardware or programming issue (we're using an old board and OI, and a not-quite-working competition switch, so it could be either)?

To resolve this problem, in our Autonomous method we're adding a loop as follows:
Code:
autonomous(void){
     while(IsAutonomous()){
          DoSomething();
     }
}
I've been reading on Chief Delphi that if a loop goes on for too long, it can time out and disable the robot. Will that happen here, or does WPILib itself take care of switching between the method and sending/receiving info? If so, anything I can do about it?

Thank you so much for your help.