Basically the title. When we use VictorSP’s in Eclipse it gives us the “Robots dont quit” error in the driver station. The console updates so quickly so we cant copy it out. Any help appreciated.
“Robots don’t quit” (at least in this context) likely means you’re not sending commands to the Victors fast enough. Try disabling MotorSafety using:
*VictorSP*.setSafetyEnabled(false);
That wouldn’t be legal for comp would it?
This is completely legal. There’s no rule that require you to have safety enabled on your motor controllers (or that you even use the three official languages, so issues arrive with that). It simply means that your motor controllers will not continue to move your motors if they get disconnected and stop being updated. It’s usually a good idea to keep this on, but not always.
If you can use NetConsole or RioLog to copy out the error exactly, that would be nice. The “Robots Don’t Quit!” error simply means your code has crashed and is now restarting.
Under what rule? There are no restrictions on software as long as it
- Is publicly released before kickoff/developed after kickoff.
- Runs on a RoboRIO with the correct firmware/image requirements.
I meant it as a question not as a statement.
No, that would say that outputs not updated often enough. Like Bkeeneykid said, it means the code crashed. One common cause is resource overallocation (eg opening PWM 1 twice).
To anyone still lurking:
Just to make sure, where do I put the import and following code?
Currently the related code we have is in our Robot.java
VictorSP V1 = new VictorSP(1); // Left motor
VictorSP V2 = new VictorSP(0); // Right motor
V1.set(1); // Set speed to 1
V2.set(1); // Set speed to 1
Just to make sure, where do I put the import and following code?
That depends on the type of project you’ve created. If it’s a command based robot project, then hardware components (like motors) are usually encapsulated and controlled through a “Subsystem” class.
There’s example code for subsystems here: For the 2020 season software documentation has been moved to https://docs.wpilib.org. Documentation for KOP items can still be found here. | FRC KOP Documentation
and general information on the command based project here: For the 2020 season software documentation has been moved to https://docs.wpilib.org. Documentation for KOP items can still be found here. | FRC KOP Documentation
If you’re using just a plain iterative robot project without calls to a Scheduler class / commands / subsystems, then the motor objects would typically be class variables of Robot.java, instantiated in the constructor, and the .set() methods would typically be called from within the TeleoperatedPeriodic() and AutonomousPeriodic() methods depending on what you’re trying to do.
Regarding imports, those always go in the same place within a .java file. At the top preceding the line that specifies the class name. Eclipse will automatically put it in the right spot if you right click the red underlined text and select the add import option.