Quote:
|
Originally Posted by amateurrobotguy
I want to do some automation. I put Automation(); in the user routines fast.c under the 'insert auto in here'. Does this need to be Automation(void);?
I put Automation(); in the userroutines.h. Does this need to be automation(void);?
What would be an example of why the void is used? I know it is something like if the function returns output but do I need to expressly say this function has run?
I put my my automation function in user_routines.c defining it as void automation(void) {
Please tell me if all that I said is o.k.
Now how do I make it so that I can put Automation in its own .c file? Will it need its own .h? Do I have to define the .c file in ht userroutines.h? How will it know to use automation.h? to get to automation.c? to get to automation().
Now, how do I test this auto code without being in a match? Do I just move the call to automation from urf.c to ur.c?
|
I think you need to learn a bit more about C and C function prototyping. A good link repository is on the
AVRFreaks Forum.
You could just move the functions from user_routines_fast.c to user_routines.c, or you can create an autonomous jumper. I forget specifically what pins you need to jump on the OI, but a quick search should bring it up.