View Single Post
  #8   Spotlight this post!  
Unread 10-03-2015, 15:38
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
Exclamation Re: Need help with logic

Quote:
Originally Posted by Alan Anderson View Post
Just put the flat sequence inside a while loop in Periodic Tasks. Right-click on the edge and add frames as needed.

Each of the "wait until" steps should be implemented as a while loop inside one of the frames. Put the code to read a joystick button or limit switch inside the loop, with the logic set up to stop the loop when the desired condition occurs. Also add a 5-20 millisecond Wait inside the loop, to keep it from running as fast as possible and starving other tasks of CPU time.
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
Attached Thumbnails
Click image for larger version

Name:	Program.png
Views:	30
Size:	22.8 KB
ID:	18590  
Reply With Quote