View Single Post
  #3   Spotlight this post!  
Unread 15-01-2006, 20:42
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
Re: Need a little help with how to break out of the box

user_routines_fast.c is for auton and user_routines.c is for manual driving.

make a .c file and a .h file(make sure when saving)

the header file or .h is for defining variables and the function prototypes such as
void Automation(void);
but when you use the function in the program its just Automation();

look at how the the user_routines.c and user_routines.h are set up.
In the Automation.c put:

#include "user_routines.h"
#include "Automation.h"
put all the includes that you see in user_routines.c

void Automation(void)
{
//put the code here
}

in user_routines_fast.c (and where ever else you call it) put the
#include "Automation.h" with all the others.

for the header file (Automation.h) to work you have to put

#ifndef __user_program_h_
#define __user_program_h_

//Define variables here (this not needed but it is for organization)


//Define function prototypes here(this also is commented out like the line above)

#endif

Sorry for the bad explanation this should help a lot http://www.ifirobotics.com/docs/lega...2-apr-2004.pdf

To test programming create this for the Operator interface competion port
http://www.ifirobotics.com/docs/comp...guide-reva.pdf
CAREFULL!! OR YOU COULD FRY YOUR OPERATOR INFERFACE

look here: http://www.chiefdelphi.com/forums/sh...ad.php?t=41472

Last edited by 6600gt : 15-01-2006 at 20:48.