|
Re: Header files
I appricate the help. I will have to get back later. I just tried building it one more time to make sure it gave me the same error. Now I get a whole bunch more. I know why. As I said earlier, the origional programmer made a header to define all the oi inputs that I do not have a copy of. I will have to make my own. I don't know why I didn't get these errors before. I expected to. I am starting to question how well my compiler is really working.
I somehow fixed the problem. Everything compiles just fine now. I am not sure what was wrong. I still think I might just have needed to reboot my computer. Windows adn windows programs tend to do funny things when they are left running too long. All I get are some function warnings, which I will have to work on. Anyway, they are not a big deal. However, I still have a small problem. I got this in an email
oiboard.h
/* Operator Interface Aliases */
// Joysticks
// - Each Joystick has 8 members, which should be supplied for 'i'.
// - There are 4 analog inputs: 'x', 'y', 'wheel', and 'aux'
// - And 4 switch inputs: 'sw_trig', 'sw_top', 'sw_aux1', and 'sw_aux2'
#define drt_driver(i) p2_##i
#define drt_operator(i) p4_##i
#define drt_aux1(i) p1_##i
#define drt_aux2(i) p3_##i
// Analog Knobs
#define drt_knob1 drt_aux1(x)
#define drt_knob2 drt_aux1(y)
#define drt_knob3 drt_aux1(wheel)
#define drt_knob4 drt_aux1(aux)
// Four more unused analog inputs on drt_aux2
// Three-Position Switches
#define drt_3p1_high drt_aux1(sw_trig)
#define drt_3p1_low drt_aux1(sw_top)
#define drt_3p2_high drt_aux1(sw_aux1)
#define drt_3p2_low drt_aux1(sw_aux2)
// Switches and buttons
#define drt_switch1 drt_aux2(sw_trig)
#define drt_switch2 drt_aux2(sw_top)
#define drt_push1 drt_aux2(sw_aux1)
#define drt_push2 drt_aux2(sw_aux2)
// State Switches
// - The State Switches are so called, because the switches are processed based
// - on the state of an analog input. With 4 switches per analog, there is
// - a total of 16 states.
#define drt_switch_set1 drt_aux2(x)
#define drt_switch_ser2 drt_aux2(y)
#define drt_switch3 DRT_StateSwitch(1)
#define drt_switch4 DRT_StateSwitch(2)
#define drt_switch5 DRT_StateSwitch(3)
#define drt_switch6 DRT_StateSwitch(4)
#define drt_push3 DRT_StateSwitch(5)
#define drt_push4 DRT_StateSwitch(6)
#define drt_push5 DRT_StateSwitch(7)
#define drt_push6 DRT_StateSwitch(8)
// Console LEDs
#define drt_LED1 Pwm1_green
#define drt_LED2 Pwm1_red
#define drt_LED3 Pwm2_green
#define drt_LED4 Pwm2_red
#define drt_LED5 Relay1_red
#define drt_LED6 Relay1_green
#define drt_LED7 Relay2_red
#define drt_LED8 Relay2_green
I know it was part of the problem. I do not have an original copy of the file. I think there might be more to it. All I know is one of my issues was a line of code that said
#define SW_PERCISION_DRIVE drt_driver(sw_trig)
and two others like it. Can someone tell me where that might be defined. I don't see it in this oiboard.h file and I can't figure out where else he might have mapped the origional input names to these names. For right now, I am just going to use the conventional names becaue I know they are defined
thanks
Last edited by dpeterson3 : 04-09-2008 at 20:57.
Reason: Fixed the problem
|