|
Re: Hmm...How can I respond quicker to encoder input?
If you're running your loop in teleopPeriodic(), your latency will probably be closer to 20ms (that's the default period). However, making a higher-frequency loop with a TimerTask is definitely feasible. 1ms, I'm not sure of, but what I'd do is bring it down to 10ms, then 5ms, and see how the CPU usage is affected (you can check that with the DS Log Viewer). As long as you stay below ~80%, you should be fine. You could push it higher if you're certain there won't be any occasional peaks that take up that 20%.
__________________
I code stuff.
|