Quote:
|
Originally Posted by davelu
in the header file i defined BASE_DR pwm01=pwm02
Limit_Switch_Min(BASE_1_LIMIT,&BASE_DR);
but if i write it this way it doesn't
Limit_Switch_Min(BASE_1_LIMIT,&pwm01);
|
"BASE_DR" will be replaced in the call by "pwm01=pwm02"
so what you are getting is:
Limit_Switch_Min(BASE_1_LIMIT,&pwm01=pwm02); // your syntax error begins at the = sign.
when you really just wanted
Limit_Switch_Min(BASE_1_LIMIT,&pwm01);
Change your define to:
#define BASE_DR pwm01
and it will work the way you planned.
As to your other question I haven't had time to go look at the Vex controller yet to make sure.
P.S. The Vex start code prints the values of all the controls to the IFI terminal window in order, and you can see which ones change when you move each control.
#define PWM_in1 rxdata.oi_analog01 //Right joystick x
#define PWM_in2 rxdata.oi_analog02 //Right joystick y
#define PWM_in3 rxdata.oi_analog03 //Left joystick y
#define PWM_in4 rxdata.oi_analog04 //Left joystick x
#define PWM_in5 rxdata.oi_analog05 //Ch. 5 buttons on back of transmitter
#define PWM_in6 rxdata.oi_analog06 //Ch. 6 buttons on back of transmitter