View Single Post
  #2   Spotlight this post!  
Unread 23-01-2011, 16:48
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,406
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Why isn't this working?

Can you put more debug in there? Debug is your friend.

Also, does case 0 run once or never? From a quick examination of the code it looks like
"last_switch_state = servoswitch.Get();"
right before your while loop would result in

"(servoswitch.Get() != last_switch_state)"
returning true always, especially if no or very little time elapses between the two statements.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!