View Single Post
  #34   Spotlight this post!  
Unread 23-02-2015, 18:14
curtis0gj curtis0gj is offline
Registered User
FRC #5033 (Beavertronics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Canada
Posts: 121
curtis0gj will become famous soon enough
Re: functions for auto

Quote:
Originally Posted by Arhowk View Post
To review
Static methods are designated by the "static" keyword, accessed through the classes name itself (ex. "Auto.run"), and do not have accessed to instanced variables and methods
Instaneced methods are designated through the lack of the "static" keyword, accessed through an instance of the class (ex. "autonManager.run..."), and have access to instanced variables and methods.

The specified piece of code is in Robot.autonomousInit. In robot, you have an instance of Auto named "autonManager", yet you attempt to call the instanced method "run" by designating the class "Auto" instead of the instance "autonManager"
Okay I think I understand,
Will this fix my issue.

Code:
     public Auto auto; 

     auto.run(this, autoMethod);
Reply With Quote