|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: No Robot Code
We did that. We have the latest image and firmware and Java on the roboRIO. We also Updated the eclipse plugins and redownloaded the update suite.
|
|
#2
|
||||
|
||||
|
Re: No Robot Code
You are using static initialization. This means you do not know what order Objects are going to be created in. For example, in your DriveSubsystem on line 19 you call Robot.oi.getX(). Robot.oi is null and has not been created yet.
The easiest way to fix this is to create your robot project with RobotBuilder. |
|
#3
|
|||
|
|||
|
Re: No Robot Code
Quote:
|
|
#4
|
|||
|
|||
|
Re: No Robot Code
The problem AustinShalit is pointing out isn't so much the fact that your variables are static but more that you're not being careful about the way you initialize them. Robot.robotInit() gets called after object variable initialization, take a look at this:
Robot.driveSubsystem initialized: driveSubsystem.x initialized from Robot.oi.getX() driveSubsystem.y initialized from Robot.oi.getY() * (Robot.oi.getRTrigger() + 0.5) other stuff...Robot.robotInit() called: Robot.oi initializedSee a problem here? In general though, the best way to work through these issues (besides implementing a better architecture/ conventions that prevent it from happening) is outlined in euhlmann's post. |
|
#5
|
||||
|
||||
|
Re: No Robot Code
Quote:
|
|
#6
|
|||
|
|||
|
Re: No Robot Code
Oh Yay!!! That fixed Evereything! Thank you all!!!!
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|