Quote:
Originally Posted by Greg McKaskle
TeleOp is designed to return to the scheduler and be called again every 20ms. If you put code there that takes longer than 20ms to run, it will cause the robot to miss joystick values. I'd recommend putting the code into Periodic tasks and using a global to cause it to start and stop when appropriate, auto or teleop.
Greg McKaskle
|
Thanks! I'll try that tomorrow. Could you elaborate on what you mean by using a global? Do you mean make a global boolean variable in teleop to check if the button is pressed, then read the global in periodic tasks and perform the action?