View Single Post
  #7   Spotlight this post!  
Unread 10-02-2013, 23:00
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,113
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: Error While Making Relay Work For Certain Time

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.
Reply With Quote