View Single Post
  #9   Spotlight this post!  
Unread 24-02-2004, 16:12
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,186
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Autonomous testing question

There are 3 "modes" that the RC can process. It can only be in one mode at a time. The 3 modes are User Control Mode, Automous Mode, and Disabled Mode. In user mode, the Default_Routine() function is called. Any code in this routine is repeated about every 25 milliseconds. The mappings in this file is what links your joystick to motor outputs.
Disabled Mode is a function that disables all outputs on the RC.
All autonomous mode is another function that still allows outputs, but no inputs to be linked to outputs. This is why all the code must be self contained in auto mode, by using counters or whatnot..

When you set a team number, it is setting your robot to run by default in user mode. This will loop indefinitely until an outside event triggers a new call (or the battery dies) When the team number is 0000, the RC interperets that as just another call to the automous mode.. so it will always be true (on) There is no need to change the program to test it this way.

Also, if you are using this method and timers in your code.... if your code reached until the end of the 15 second auto period, i recomend puting else statements or something else at the end of your code that will set all of your output values to neutral so you dont run someone over.