View Single Post
  #7   Spotlight this post!  
Unread 16-01-2008, 04:18
JohnC's Avatar
JohnC JohnC is offline
my other name is nigel
FRC #0360 (360 Revolution)
Team Role: Programmer
 
Join Date: Mar 2005
Rookie Year: 2005
Location: user_routines.c
Posts: 100
JohnC is a jewel in the roughJohnC is a jewel in the roughJohnC is a jewel in the roughJohnC is a jewel in the rough
Send a message via AIM to JohnC
Re: Autonomous mode does not work

It's "rc_dig_in##" not "rc_dig_in_##" - no final underscore.

Also, why are you checking the value of pwm01? It seems like it would make more sense just to use:
Code:
if(rc_dig_in01) {
  pwm01 = 254;
  pwm02 = 254;
} else if(rc_dig_in02) {
  pwm01 = 0;
  pwm02 = 254;
} else if(rc_dig_in03) {
  pwm01 = 254;
  pwm02 = 0;
} else {
  pwm01 = 127;
  pwm02 = 127;
}
__________________
What place are we at? ... TODAI!