View Single Post
  #8   Spotlight this post!  
Unread 10-02-2013, 23:26
piguy123 piguy123 is offline
Registered User
FRC #4751
Team Role: Programmer
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Canada
Posts: 6
piguy123 is an unknown quantity at this point
Re: Error While Making Relay Work For Certain Time

Quote:
Originally Posted by Alan Anderson View Post
If you put a delay inside Teleop, you will break things. The way the system works, Teleop gets called once every time a communication packet from the Driver Station arrives. It needs to finish very quickly so it can process the next packet.

Move your relay code into a While loop in Periodic Tasks. You'll have to make some adjustments to the way you're handling your delays before it will work right, though.
Thanks!
Reply With Quote