Quote:
Originally Posted by david.e.boles
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 initialized See 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.
|
Could not have said it better!