Quote:
Originally Posted by Greg McKaskle
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)