![]() |
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?
|
Re: requires() error
Quote:
|
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.
|
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 {}
|
You must put it in the robot.java file if using command base
Ex. Elevator = new elevator Then in the requires(robot.elevator) |
| All times are GMT -5. The time now is 22:31. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi