|
Re: Code in Periodic Tasks working with teleop
Doh. Joe gets the prize. Make sure your code doesn't run just once by putting it in a loop.
Keep the code in periodic tasks, but make sure that the joystick code is checked more than once. Put it in a loop and put a delay of 100ms or so to make sure the code doesn't run faster than needed.
You place a breakpoint in the code by opening the diagram, right clicking and choosing to probe or breakpoint. As you mention, when if the robot stops responding, it will shutdown the I/O, but you can still debug the code. Generally, whenever debugging, start with the robot on blocks, and don't remove it until you know how it will respond.
Greg McKaskle
|