Thread: Code check ASAP
View Single Post
  #10   Spotlight this post!  
Unread 18-02-2011, 13:03
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: Code check ASAP

The "once per button press" doesn't care what other buttons were pressed in the past unless you explicitly write the program to do so. The Button 3 code can do anything you want it to do, including changing things that the Button 2 code did.

Reminder: don't put any long-running loops inside those "run once" cases. That would stall the Teleop vi and the motor safeties for things like your drivetrain will trigger, shutting down the robot outputs until the loop completes. If you use the buttons to start a sequence of events, either that sequence will have to be written as a state machine in Teleop, or you will have to implement it in the Periodic Task vi.
Reply With Quote