Go to Post Most members of the CD community are happy to help one another. But searching before you post is standard forum etiquette... - KathieK [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread Yesterday, 19:18
JLuna JLuna is offline
Registered User
FRC #2523
 
Join Date: Sep 2016
Location: Lyndonville, Vermont
Posts: 5
JLuna is an unknown quantity at this point
Help With illegalUseOfCommand Exception?

Hi,
I'm the programmer from team 2523, and I've run into a really frustrating error that nothing seems to fix. From what I can tell, the issue is that my driverunner subsystem, which runs methods from my driveTrain subsystem, does not "require" the driveTrain subsystem. The only thing is, it does, or at least should. I've checked quite a few times, and the "requires(Robot.driveTrain)" call is spelled correctly and in the right place. Is there anything else that could cause this?

Also, after that, the system says that "startCompetition()" should have handled the error.

Here is the full error (ignore the joystick error, ours is still in a box from last year ):
********** Robot program starting **********
NT: server: client CONNECTED: 169.254.105.173 port 63780
Warning at org.usfirst.frc.team2523.robot.OI.<init>(OI.java:5 0): Joystick Button 1 on port 1 not available, check if controller is plugged in
Error at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:249): ERROR Unhandled exception: edu.wpi.first.wpilibj.command.IllegalUseOfCommandE xception: A default command must require the subsystem at [edu.wpi.first.wpilibj.command.Subsystem.setDefault Command(Subsystem.java:101), org.usfirst.frc.team2523.robot.subsystems.DriveTra in.initDefaultCommand(DriveTrain.java:71), edu.wpi.first.wpilibj.command.Subsystem.getDefault Command(Subsystem.java:123), edu.wpi.first.wpilibj.command.Scheduler.run(Schedu ler.java:223), org.usfirst.frc.team2523.robot.Robot.disabledPerio dic(Robot.java:95), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:88), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:247)]
WARNING: Robots don't quit!
---> The startCompetition() method (or methods called by it) should have handled the exception above.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi