View Single Post
  #10   Spotlight this post!  
Unread 05-03-2010, 09:49
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

Quote:
Originally Posted by Greg McKaskle View Post
Personally, I'd do the parallel periodic task loop. You will copy the code that does the solenoid and put it in the periodic loop. You still have teleOp code that checks the trigger, but now will just set a global. The periodic loop will check the global. Once the new code looks right, you can start disconnecting and deleting the stuff from Periodic.

Greg McKaskle
With those "functional global" refnum VIs, it means you don't have to use a global variable at all; you can acquire the joystick data in periodic tasks just as easily as you can in Teleop.
So yes, take all the code in Teleop that actuates this kicker, and move it to Periodic tasks, with a 20ms wait in the empty case of the case structure.
(The driver station only sends data every 20ms, so there's no need to check any faster than that)
__________________
-- Marshal Horn
Reply With Quote