|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
separate classes
Our labview programmer uses seperate VI's for everything and i was trying to do the same thing in java. for some reason i cannot get it to work. it compiles correctly and uploads, but it never then works. can i get any help.
here is the code thanks |
|
#2
|
||||
|
||||
|
Re: separate classes
The only thing I see without knowing what you symptons are, is that you never instantiate DriveRobot.driver.
In the future when you post issues like this, you need to include more information. Are there any errors? Does the DS say "No Code", "Watchdog Not Fed", etc? Does the DS message change when you enable or disable it? These are all important pieces of information we can use to help find your issue. I would also say that seperating functionallity is often a good thing, but you're sperating things in an unusual way. I suggest you spend some time reading Java code posted by other teams. It may give a better idea of how Java programs should be partitioned. |
|
#3
|
||||
|
||||
|
Re: separate classes
Quote:
|
|
#4
|
||||
|
||||
|
Re: separate classes
When i run the code on the robot, it runs and enables, but the joysticks never control anything. the victors do enable. i put relay code into the main file in the operatercontrol section, and it does not run either. so i do not belive the code gets to operater control.
|
|
#5
|
||||
|
||||
|
Re: separate classes
Quote:
|
|
#6
|
|||
|
|||
|
Re: separate classes
First, check the manifest file in the resources/META-INF/ folder. It should look something like this (note that MIDlet-Name can be basically whatever you want):
Code:
MIDlet-Name: ASimpleJavaBot MIDlet-Version: 1.0.0 MIDlet-Vendor: FIRST MIDlet-1: spike, , com.hedgehog.spike.spike MicroEdition-Profile: IMP-1.0 MicroEdition-Configuration: CLDC-1.1 Java is a very object-oriented language, so you may want to investigate using static fields so that you don't have to instantiate your Inputs and Joysticks classes. Over here you can see our code. We made big steps in properly using Object Orientation to make our code not be a complete mess, and kinda succeeded. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|