Quote:
Originally Posted by PhilBot
... and then in Teleop I just do two calls.... one to read the Compressor status, and one to Stop the Compressor (normally used in response to a compressor on/off switch on the DS)
With these two VIs called once per teleop cycle, my motors go back to stuttering once a second.
|
You could certainly make this much more efficient.
Only call them once and only once each time the DS switch is thrown, not 50 times a second...
In general, don't call things when you don't have to and it'll save you a lot of wasted time and grief.
You will have to call things like your drive motors every time a new driver packet arrives, because those inputs change rapidly.
Other things controlled by a button or switch generally do not have to be called so often. Just when the switch or button changes.