View Single Post
  #10   Spotlight this post!  
Unread 10-03-2015, 18:04
bacarpenter bacarpenter is offline
Lead programmer (2 years)
AKA: Baylee Carpenter
FRC #2197 (Las Pumas)
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2014
Location: Indiana
Posts: 19
bacarpenter is an unknown quantity at this point
Re: Need help with logic

Quote:
Originally Posted by Alan Anderson View Post
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.
Okay so I put it inside of the while loop and it works but it'll only work once.
Attached Thumbnails
Click image for larger version

Name:	Program.png
Views:	28
Size:	209.1 KB
ID:	18592  
Reply With Quote