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