Thread: Delay Problem
View Single Post
  #2   Spotlight this post!  
Unread 11-02-2014, 16:47
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Delay Problem

Quote:
Originally Posted by SoftwareRachel View Post
Hello, My team is trying to run a CIM motor connected to a victor as a part of our shooter. We need to run it for a specific (short) length of time, but when we use either a Timer.delay or a while loop in a command in the subsystem, the other motors running pause. Does anyone have any solutions to this? Thank you.
All the code in TeleOp must execute in less than 20ms so that it can be called again when the next DS packet arrives.

You can use a state machine, start a new thread, or use the CommandBased framework.


Reply With Quote