View Single Post
  #12   Spotlight this post!  
Unread 05-03-2010, 14:09
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Teleop Issue - Motor Control Seems to Freeze

Place the entire joystick code in periodic tasks.
There's only two main differences between Teleop and a loop in Periodic tasks:
  1. Teleop should be able to execute in less than 20ms, whereas a loop in Periodic Tasks can take as long as you like.
  2. The loop in Periodic tasks will execute regardless of what mode the Robot is in. (teleop, autonomous, disabled, etc.) With autonomous, this isn't a problem, because the robot does not receive updated joystick data during autonomous. (With Disabled it does, but all the outputs will be disabled. Depending on whether you use a time-based or sensor-based sequence, this might simply make the robot wait until it is re-enabled before kicking.)
__________________
-- Marshal Horn
Reply With Quote