Gettin a loop time overrun error; I’m using a changing arb feed forward for all of our mechanisms so having a slow loop time is not ideal. Can’t quite figure out what part of my code is slowing down the loop, or if there even is a way to speed it up.
You need to sum up the time it’s taking to make the series of calls and see how long your loop time could potentially be in the worst case scenario.
Some of the TalonSRX calls are very slow (up to 4 ms a piece), so if you call a bunch of them in succession they can stack up very highly, very quickly. Just as an example, you call a talon get sensor position in each movement call for the Elbow and Wrist in your Arm movement. I don’t remember the exact timing of those (if they are the slow ones or not) but that could be the cause.