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!
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.
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.