Output not updated often enough

So I am using command-based programming. I have a cliche tankDrive command class which calls a tankDrive method of my chassisSubsystem class. Pretty straightforward. When I call any method of the RobotDrive class, everything works fine. However, when I call one of the CANJaguar’s that I passed into the RobotDrive constructor individually, I get the following message:

[cRIO] Robot Drive… Output not updated often enough.

Here is the exact method I call:



leftMotor.setX(470);

(I am using the speed control method, and 470 is what gets the jaguar to output 12V. I have tested the speed encoder, which works fine).

Can anyone help me? Thank you so much in advance!

It means exactly what it says. You have to update the outputs often enough or they won’t function. It’s a safety device built into the WPILib and the cRIO.

As for how to fix it, I’m not sure, as I can’t see all of your code and I’m not familiar with the CANJaguar and RobotDrive classes.

This is a function that is repeatedly called by a command every few milliseconds. That’s not often enough? Would I have to call the setX commands more often?

Use Timer.getFPGATimestamp(); to verify your loop timings.