Thread: Multiple Autons
View Single Post
  #15   Spotlight this post!  
Unread 12-03-2010, 09:46
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Multiple Autons

Will these work if you are standing 5 feet away from your controls? If you are using a joystick as your method for selecting an autonomous mode, you need to do it in disabledPeriodic. And you need to set a VARIABLE to some value in response to the input. Your joystick methods are state calls. They don't remember what was done in the past. You store the input in a GLOBAL variable that can be examined by autonomous.

Do not place your autonomous code in autonomousInit, as this is called only once on the way to autonomousPeriodic. Initialize variables and motors and perhaps decide which auton to run in autonomousPeriodic.

HINT: see my code above
__________________
I don't need a signature.
Reply With Quote