View Single Post
  #1   Spotlight this post!  
Unread 02-02-2008, 12:16
personfromhell's Avatar
personfromhell personfromhell is offline
Shaman Me
FRC #1389 (Suck Nuts)
Team Role: Programmer
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Maryland
Posts: 5
personfromhell is an unknown quantity at this point
Re: p1_sw_aux data type

Thank you, I figured it would be essentially a Boolean value but wasn't sure because my code wasn't working. My next question is then why doesn't this code work:
Code:
  if(p2_sw_aux1) {
	pwm01 = 187;
  } else if(p2_sw_aux2) {
	pwm01 = 67;
  } else {
	pwm01 = 127;
  }
pwm01 goes to a motor that is meant to pivot two casters. I know that the victor its wired to works as well as the controller and cables and such. I know that in C++ the if statements should work but I haven't used C in a while and I forgot the differences in the two standards. Again, any help is greatly appreciated.
__________________