I'll just handle this part:
Quote:
Originally Posted by joelg236
Figuring as I have not tested this out, I am curious about this :
Maybe I'm just brain-dead, but I don't quite understand why that is true. I was not aware that WPILib created all of the objects. It seems to me that if that were at all true, EVERY object would be initialized twice (because of the robotInit() method)
|
I was wrong here. WPILib doesn't create the objects automatically. Java ME creates a MIDlet object to start your application - this is different than in desktop Java, which calls the "main()" method of your application class.
The MIDLet created for your robot is is your MainRobotFunctions class (because MainRobotFunctions
is a SimpleRobot
is a RobotBase
is a MIDlet).
Java ME knows to create "MainRobotFunctions" becuase the class name is stored in your manifest.mf file.