|
Re: Header files
Quote:
Originally Posted by dpeterson3
Hello. I am new to programing. I am trying to upgrade last years code to use Kevin Watson's new code for the new compiler (I can only get my hands on the new one). Anyway, I have a problem with global variables. We had a file called globals.h which stored all our global variables. I copied it into the directory of the new code files, and the file itself compiles jsut fine. However, I call it from my homemade user routines file, and I end up with errors. The compiler spits back "E:\Backup\ifi_frc\globals.h:62:Error: syntax error" I don't understand. How can the header compile just fine on its own and not from another file? Any ideas
Another quick question. I have a printout of a file called oiboard.h in which the oi board inputs are mapped to such as "drt_aux1(sw_swtrig)" which refers to the trigger on the stick on input one. I assume this file is for the oi board and defines how the board sends signals. Am I correct? What I mean is does this code go on the oi board so when it sends data, instead of seeing p1_x, it sees drt_aux(x). I hope I made myself clear enough.
thanks
|
I'm not sure about the first question, but the second question is easy: the OI (at least the old one) doesn't take any code of its own. You'll need to code the file into the robot code.
__________________
Past teams:
2003-2007: FRC0330 BeachBots
2008: FRC1135 Shmoebotics
2012: FRC4046 Schroedinger's Dragons
"Rockets are tricky..."--Elon Musk

|