Error 1 "Output not updated enough" on driver station

I am aware that there are other posts about this error. I looked at many of them and could never find a solution to this problem. I am trying to run teleop code to just spin 2 motors that will be used to shoot the power cells (balls). We are calling this subsystem the “Ion Cannon”. The other subsystem I have created is the drive train. I can successfully deploy the code to the robot but when I initialize teleop the driver station says Error 1: teleopdrive output is not updated enough. The orange light also flashes. Disabling the safety will remove the error but the light still flashes and the motors will not spin.

I have linked our java folder so you can look at any part that may be causing the problem. Thanks for your help!

Java Folder

1 Like

The folder appears to be empty. Also, a service like Github will (at least in my opinion) make more people willing to help you, as they won’t have to download any files to read through your code.

What we did was set a default command to put our joystick inputs into our arcade drive in the drive subsystem. This fixed our error yet I wouldn’t know how to scale inputs.

I changed the link to github

could you be more specific or show me what you are talking about? I have the teleopdrive command set as the default in both the drivetrain and ionCannon subsystems.

Nowhere in your code are you ever sending updated values to your MecanumDrive object. Thus triggering the watchdog and the dredded “Output not updated often enough” warning. That’s why turning off the safety “fixes” it.

In addition to this, I noticed you aren’t really following the Command Based paradigm.

Generally, you only ever have one subsystem required by any given command. You make individual commands to perform actions on the subsystem, and then if you want to chain/combine those you would use CommandGroups. Commands are then only run while they have an active job to do, which for driving is the entirely of teleop, which is why its a default command, but there is no reason for the fire logic to be setup that way since it only needs to be active once in a while and otherwise is at a constant state of rest.

So in your instance, the common approach would be to make a FireCannon Command, that requires the IonCannon subsystem and performs the actions on the IonCannon. Then, in your OI you’d create a JoystickButton that triggers the FireCannon command whileHeld(). In your FireCannon command you’d have logic to open the cannon in execute(), and in end()/interrupted() to close it again for when nothing is being done with it. Your TeleopDrive Command would then JUST be handling updating the Drivetrain subsystem with the current Joystick values from the OI.

Here is the documentation for the old Command Based Framework you appear to be using in this case:

As well as the new Framework, which has differences, but I do recommend moving to as it is inevitable at this point that the old framework will eventually cease to function/be included in WPILIB:

It can also be helpful to go through the Examples for the Command Based Framework, these are for the new one, but I’m sure you can find the old ones from an older installation/going back in the wpilib repository to last season.