View Single Post
  #5   Spotlight this post!  
Unread 16-01-2006, 00:28
6600gt's Avatar
6600gt 6600gt is offline
Registered User
AKA: Lohit
FRC #0226 (Hammerhead)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Troy, MI
Posts: 221
6600gt is a jewel in the rough6600gt is a jewel in the rough6600gt is a jewel in the rough
Thumbs up Re: Need a little help with how to break out of the box

The subroutine is right but you have to put a function prototype in the user_routines.h
ex. void Automation(void); like the others already there

Now place this subroutine below all others in user_routines.c

Then call it like inside the function, void Process_Data_From_Master_uP(void)
and comment out the Default_Routine()
ex. (to allow you to control when the auton on and off)

if(p1_sw_trig==1)
Autonomous();
else
Default_Routine();
//basicly you have to hold the trigger to execute the auton.

No that wont work because it will only execute the auton once for a fraction of a second (26.2 ms to be exact) because the next time the automationhasrun = 1 so it wont run again;
DON'T DO THIS BECAUSE YOU DON'T HAVE CONTROL OVER IT.

The trigger control above will let you control the running of the auton.