View Single Post
  #9   Spotlight this post!  
Unread 10-03-2015, 16:25
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Need help with logic

Quote:
Originally Posted by bacarpenter View Post
I tried to do what you said but the while loop inside of the flat sequence runs and the outside loops isn't executed. I posted a picture of what I currently have
With that code, you're essentially taking a snapshot of the joystick button and the limit switch before the flat sequence begins, and not reading them again until it has ended.

You need to put the Joystick Get and the Switch Get Value functions inside their respective loops, so that you're repeatedly reading their current value.

Last edited by Alan Anderson : 10-03-2015 at 16:30.
Reply With Quote