View Single Post
  #1   Spotlight this post!  
Unread 19-02-2012, 11:13
jwatson12 jwatson12 is offline
Mr. Watson
FRC #1025 (Impi Warriors)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Michigan
Posts: 17
jwatson12 is an unknown quantity at this point
Locking out actions based on a button press (without using variables)

Hi All:

We have a programming puzzle where we would like to lock out certain functions when a button is pressed. For example, when opening a solenoid by pressing button 5, motor actuation assigned to axis 2 of joystick 2 (for speed control) is disabled until a different button is pressed. Then, once button 7 is pressed, control is restored. Our current solution is to use a case statement assigned to button 5 that when true sets the solenoid and then a while loop is called within the Case structure until interrupted by Button 7. The exit tunnel of the case structure then continues the opposite solenoid action.

Can someone take a look at this and tell me if this is on the right track or is there a better way?

Thanks!
Attached Thumbnails
Click image for larger version

Name:	Press Button five.png
Views:	22
Size:	25.6 KB
ID:	11987  Click image for larger version

Name:	Press Button seven.png
Views:	12
Size:	21.3 KB
ID:	11988  

Last edited by jwatson12 : 19-02-2012 at 11:17.
Reply With Quote