Go to Post The events are not just a competition, but a celebration of 6 weeks of hard work. - ChristinaR [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2015, 14:29
therealdavier therealdavier is offline
Registered User
None #1796
 
Join Date: Jan 2015
Location: America
Posts: 1
therealdavier is an unknown quantity at this point
requires() error

While trying to include a new elevator object in our command based robot, we receive errors specifically with the requires tag. Any ideas?
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2015, 14:30
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: requires() error

Quote:
Originally Posted by therealdavier View Post
Any ideas?
Idea #1, post more information, preferably a link to an online location containing your code. There is not nearly enough information here to help.
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2015, 23:40
Jalerre's Avatar
Jalerre Jalerre is offline
Registered User
FRC #4965 (FIRE)
Team Role: Alumni
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Anderson, SC
Posts: 147
Jalerre is on a distinguished road
Re: requires() error

I agree, there is not enough information to conclude what the problem is. However I can tell you a solution to a problem we had with the requires statement. Because CommandBase does not exist anymore for you to make instances of all your subsystems, you now have to use requires(Robot.subsystem_instance). If this does happen to be your problem also note that you have to import you commands and subsystems manually now.
__________________
Vex
2013: 415 - Fabrication, Programming, Electrical
2014: 415D - Captain, Programming Lead
FTC
2014: 7354 - Programming Lead
FRC
2013: 415 - Safety Animation, Fabrication
2014-2015: 4965 - Programming & Electrical
2016: 4965 - Captain, Programming Lead, Electrical

Last edited by Jalerre : 01-02-2015 at 19:21.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-02-2015, 21:34
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: requires() error

Try putting the requires method inside the constructor of the command. If you don't know what a constructor is: it's a method that is called at the time of instantiation or whenever you say new command. To declare a constructor, after the class declaration type "public" and the class name then () and a set of {}
Reply With Quote
  #5   Spotlight this post!  
Unread 02-02-2015, 21:22
joshmill229 joshmill229 is offline
Registered User
FRC #0229
 
Join Date: Jan 2015
Location: Massena, NY
Posts: 4
joshmill229 is an unknown quantity at this point
You must put it in the robot.java file if using command base
Ex. Elevator = new elevator

Then in the requires(robot.elevator)
Reply With Quote
Reply


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 22:31.

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