|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
VictorSP causes "Robots don't quit!"
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.
|
|
#2
|
||||
|
||||
|
Re: VictorSP causes "Robots don't quit!"
"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:
Code:
VictorSP.setSafetyEnabled(false); |
|
#3
|
|||
|
|||
|
Re: VictorSP causes "Robots don't quit!"
Quote:
That wouldn't be legal for comp would it? |
|
#4
|
||||
|
||||
|
Re: VictorSP causes "Robots don't quit!"
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. |
|
#5
|
||||
|
||||
|
Re: VictorSP causes "Robots don't quit!"
Under what rule? There are no restrictions on software as long as it
|
|
#6
|
|||
|
|||
|
Re: VictorSP causes "Robots don't quit!"
I meant it as a question not as a statement.
|
|
#7
|
||||||
|
||||||
|
Re: VictorSP causes "Robots don't quit!"
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).
|
|
#8
|
||||
|
||||
|
Re: VictorSP causes "Robots don't quit!"
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 Code:
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 |
|
#9
|
||||
|
||||
|
Re: VictorSP causes "Robots don't quit!"
Quote:
There's example code for subsystems here: https://wpilib.screenstepslive.com/s...ple-subsystems and general information on the command based project here: https://wpilib.screenstepslive.com/s.../13809/c/88893 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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|