Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 134 → Rev 135

/DUBwise/bin/v0.47_pre3/DUBwise-128x128-de_64kbit_tts.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-128x128-de_64kbit_tts.jar
MIDlet-Jar-Size: 135476
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-128x128-de_64kbit_tts.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-128x128-de_tts.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-128x128-de_tts.jar
MIDlet-Jar-Size: 108740
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-128x128-de_tts.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-128x128-en_speedy.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-128x128-en_speedy.jar
MIDlet-Jar-Size: 121407
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-128x128-en_speedy.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-128x128-no_voice.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-128x128-no_voice.jar
MIDlet-Jar-Size: 81305
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-128x128-no_voice.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-128x128-wav.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-128x128-wav.jar
MIDlet-Jar-Size: 311732
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-128x128-wav.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-de_64kbit_tts.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-176x220-de_64kbit_tts.jar
MIDlet-Jar-Size: 177606
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-de_64kbit_tts.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-de_tts.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-176x220-de_tts.jar
MIDlet-Jar-Size: 150870
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-de_tts.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-en_speedy.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-176x220-en_speedy.jar
MIDlet-Jar-Size: 163537
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-en_speedy.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-no_voice.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-176x220-no_voice.jar
MIDlet-Jar-Size: 123435
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-no_voice.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-wav.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-176x220-wav.jar
MIDlet-Jar-Size: 353862
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-176x220-wav.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-de_64kbit_tts.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-240x320-de_64kbit_tts.jar
MIDlet-Jar-Size: 190637
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-de_64kbit_tts.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-de_tts.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-240x320-de_tts.jar
MIDlet-Jar-Size: 163901
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-de_tts.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-en_speedy.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-240x320-en_speedy.jar
MIDlet-Jar-Size: 176568
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-en_speedy.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-no_voice.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-240x320-no_voice.jar
MIDlet-Jar-Size: 136466
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-no_voice.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-wav.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-240x320-wav.jar
MIDlet-Jar-Size: 366893
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-240x320-wav.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-de_64kbit_tts.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-480x640-de_64kbit_tts.jar
MIDlet-Jar-Size: 471226
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-de_64kbit_tts.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-de_tts.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-480x640-de_tts.jar
MIDlet-Jar-Size: 444490
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-de_tts.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-en_speedy.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-480x640-en_speedy.jar
MIDlet-Jar-Size: 457157
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-en_speedy.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-no_voice.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-480x640-no_voice.jar
MIDlet-Jar-Size: 417055
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-no_voice.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-wav.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise-480x640-wav.jar
MIDlet-Jar-Size: 647482
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.47
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/DUBwise/bin/v0.47_pre3/DUBwise-480x640-wav.jar
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/DUBwise/src/Android/bin/DUBwise-unsigned.apk
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/DUBwise/src/Android/build.xml
1,8 → 1,8
<?xml version="1.0" ?>
<project name="DUBwise" default="debug">
<!-- SDK Locations -->
<property name="sdk-folder" value="/home/ligi/bin/android-sdk-linux_x86-0.9_beta" />
<property name="android-tools" value="/home/ligi/bin/android-sdk-linux_x86-0.9_beta/tools" />
<property name="sdk-folder" value="/home/ligi/bin/android-sdk-linux_x86-1.0_r1/" />
<property name="android-tools" value="/home/ligi/bin/android-sdk-linux_x86-1.0_r1//tools" />
<!-- Application Package Name -->
<property name="application-package" value="org.ligi" />
/DUBwise/src/Android/src/org/ligi/DUBwiseStatusVoice.java
44,7 → 44,7
last_sound=resid;
try {
player=MediaPlayer.create(root, R.raw.voice_sample_01-1+resid);
player=MediaPlayer.create(root, R.raw.voice_sample_1-1+resid);
 
player.start();
 
/DUBwise/src/Android/src/org/ligi/R.java
21,19 → 21,19
public static final int main=0x7f030000;
}
public static final class raw {
public static final int voice_sample_01=0x7f040000;
public static final int voice_sample_02=0x7f040001;
public static final int voice_sample_03=0x7f040002;
public static final int voice_sample_04=0x7f040003;
public static final int voice_sample_05=0x7f040004;
public static final int voice_sample_06=0x7f040005;
public static final int voice_sample_07=0x7f040006;
public static final int voice_sample_08=0x7f040007;
public static final int voice_sample_09=0x7f040008;
public static final int voice_sample_10=0x7f040009;
public static final int voice_sample_11=0x7f04000a;
public static final int voice_sample_12=0x7f04000b;
public static final int voice_sample_13=0x7f04000c;
public static final int voice_sample_1=0x7f040000;
public static final int voice_sample_10=0x7f040001;
public static final int voice_sample_11=0x7f040002;
public static final int voice_sample_12=0x7f040003;
public static final int voice_sample_13=0x7f040004;
public static final int voice_sample_2=0x7f040005;
public static final int voice_sample_3=0x7f040006;
public static final int voice_sample_4=0x7f040007;
public static final int voice_sample_5=0x7f040008;
public static final int voice_sample_6=0x7f040009;
public static final int voice_sample_7=0x7f04000a;
public static final int voice_sample_8=0x7f04000b;
public static final int voice_sample_9=0x7f04000c;
public static final int voice_sample_komma=0x7f04000d;
public static final int voice_sample_volt=0x7f04000e;
}
/DUBwise/src/J2ME/src/DUBwiseCanvas.java
16,9 → 16,11
 
public class DUBwiseCanvas
extends Canvas
implements Runnable
implements Runnable,DUBwiseDefinitions
{
 
int act_wp;
 
// name/handle for the recordStore to memorize some stuff
private final static String RECORD_STORE_NAME="DUBSETT";
35,7 → 37,7
private String err="";
private DUBwise root;
 
private UFOProber ufo_prober;
public UFOProber ufo_prober;
 
byte[] settings_arr;
 
50,6 → 52,12
private Image load_img;
 
 
public boolean fullscreen=false;
public int act_motor=0;
public int act_motor_increase=0;
public boolean motor_test_sel_all=false;
 
 
final static int SKINID_DARK= 0;
final static int SKINID_LIGHT = 1;
 
67,6 → 75,8
public int lcd_char_height=0;
 
public int frame_pos=0;
 
public int user_intent=USER_INTENT_NONE;
int line_scaler=20;
 
82,50 → 92,7
// variable to hold the current state
public int state=-1;
// id for each state - must just be uniq - order isnt important
public final static int STATEID_SCANNING =0;
public final static int STATEID_DEVICESELECT =1;
public final static int STATEID_MAINMENU =2;
public final static int STATEID_MOTORTEST =3;
public final static int STATEID_SELECT_PARAMSET =4;
public final static int STATEID_EDIT_PARAMS =5;
public final static int STATEID_HANDLE_PARAMS =6;
public final static int STATEID_FLIGHTVIEW =7;
public final static int STATEID_RAWDEBUG =8;
public final static int STATEID_KEYCONTROL =9;
public final static int STATEID_SETTINGSMENU =10;
public final static int STATEID_STICKVIEW =11;
public final static int STATEID_CAMMODE =12;
 
 
public boolean fullscreen=false;
public int act_motor=0;
public int act_motor_increase=0;
public boolean motor_test_sel_all=false;
 
public String[] main_menu_items={"Telemetry","Raw Debug", "view RC-data", "MK-KeyControl", "Motor Test" , "Flight Settings","Tool Settings","Remote Cam","Proxy","Change Device" , "Quit " };
public final static int MAINMENU_TELEMETRY =0;
public final static int MAINMENU_RAWDEBUG =1+MAINMENU_TELEMETRY;
public final static int MAINMENU_STICKS =1+MAINMENU_RAWDEBUG;
public final static int MAINMENU_KEYCONTROL =1+MAINMENU_STICKS;
public final static int MAINMENU_MOTORTEST =1+MAINMENU_KEYCONTROL;
public final static int MAINMENU_PARAMS =1+MAINMENU_MOTORTEST;
public final static int MAINMENU_SETTINGSMENU =1+MAINMENU_PARAMS;
public final static int MAINMENU_CAMMODE =1+MAINMENU_SETTINGSMENU;
public final static int MAINMENU_PROXY =1+MAINMENU_CAMMODE;
public final static int MAINMENU_DEVICESELECT =1+MAINMENU_PROXY;
public final static int MAINMENU_QUIT =1+MAINMENU_DEVICESELECT;
 
public String[] settings_menu_items={"Skin ","Sound ","Vibra " ,"Graph ","FullScreen " ,"Keep BGLight " ,"Back" };
public final static int SETTINGSMENU_CHANGESKIN =0;
public final static int SETTINGSMENU_SOUNDTOGGLE =1;
public final static int SETTINGSMENU_VIBRATOGGLE =2;
public final static int SETTINGSMENU_GRAPHTOGGLE =3;
public final static int SETTINGSMENU_FULLSCREENTOGGLE =4;
public final static int SETTINGSMENU_LIGHTTOGGLE =5;
public final static int SETTINGSMENU_BACK =6;
 
 
int local_max=-1;
 
256,7 → 223,7
 
root=_root;
 
debug = new DUBwiseDebug();
debug = new DUBwiseDebug(this);
 
bt_scanner = new BTSearcher();
params_editor = new MKParamsEditor(this);
374,6 → 341,16
mk.send_keys(keycontrol_bitfield);
break;
 
case STATEID_READ_PARAMS:
if (mk.watchdog.act_paramset==5)
chg_state(STATEID_SELECT_PARAMSET);
else
{
lcd_lines[0]="Reading Settings ";
lcd_lines[1]=mk.watchdog.act_paramset+"/5 |"+ (mk.watchdog.act_paramset>0?"#":"_") + (mk.watchdog.act_paramset>1?"#":"_") + (mk.watchdog.act_paramset>2?"#":"_")+ (mk.watchdog.act_paramset>3?"#":"_")+ (mk.watchdog.act_paramset>4?"#":"_") + "| ";
}
break;
 
case STATEID_MOTORTEST:
 
if (motor_test_sel_all)
393,6 → 370,14
mk.motor_test(motor_test);
break;
 
case STATEID_MAINMENU:
if (ufo_prober.change_notify)
{
ufo_prober.change_notify=false;
chg_state(STATEID_MAINMENU);
}
break;
 
case STATEID_SCANNING:
intro_str_delay--;
if (intro_str_delay<0)
585,6 → 570,41
switch(state)
{
 
case STATEID_GPSVIEW:
g.drawString("GPS-Packages: " + mk.navi_data_count ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("Used Sats: " + mk.gps_position.Used_Sat ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("Latitude: " + mk.gps_position.Latitude_str() ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("=>: " + mk.gps_position.Latitude_min_sec() ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("Longitude: " + mk.gps_position.Longitude_str() ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("=> " + mk.gps_position.Longitude_min_sec() ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
 
g.drawString("Target-Lat: " + mk.gps_position.TargetLatitude ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("Target-Long: " + mk.gps_position.TargetLongitude ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("Distance : " + mk.gps_position.Distance2Target ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("Angle: " + mk.gps_position.Angle2Target ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
 
g.drawString("WayPoints: " + act_wp + "/" + mk.gps_position.last_wp ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
 
g.drawString(" " + mk.gps_position.WP_Latitude_min_sec(act_wp) ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
 
g.drawString(" " + mk.gps_position.WP_Longitude_min_sec(act_wp) ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
 
 
break;
 
case STATEID_CAMMODE:
 
if (cam_img!=null)
645,6 → 665,16
params_editor.paint(g);
break;
 
 
case STATEID_READ_PARAMS:
paint_lcd(g,true);
 
g.setClip(this.getWidth()/2-load_img.getWidth()/6+1,this.getHeight()/2-load_img.getHeight()/8+1, load_img.getWidth()/4,load_img.getHeight()/3);;
g.drawImage(load_img,this.getWidth()/2-load_img.getWidth()/8 - ((((frame_pos/3)%12)%4)*(load_img.getWidth()/4)) ,this.getHeight()/2-load_img.getHeight()/6- ((((frame_pos/3)%12)/4)*(load_img.getHeight()/3)), g.TOP | g.LEFT);
g.drawImage(bt_img,this.getWidth()/2 ,this.getHeight()/2 , g.HCENTER | g.VCENTER);
break;
 
 
case STATEID_SCANNING:
paint_lcd(g,true);
 
690,28 → 720,31
 
case STATEID_MAINMENU:
g.drawString("probed_device" + ufo_prober.probe_result + " by " + ufo_prober.reply,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("MK-Connection(" + (mk.connected?("open"+((System.currentTimeMillis()- mk.connection_start_time)/1000)+"s"):"close")+"):",0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.setFont(f2);
g.drawString(ufo_prober.extended_name()+ " (" + (mk.connected?("open"+((System.currentTimeMillis()- mk.connection_start_time)/1000)+"s"):"closed")+"):",0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer1;
g.drawString(" Version:" + mk.version.str ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer1;
/*
 
g.drawString(" Name:" + mk.name,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer1;
g.drawString(" URL:" + mk.mk_url,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer1;
g.drawString(" Version:" + mk.version.str,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer1;
 
g.setFont(f1);
g.drawString("Packet Traffic:",0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.setFont(f2);
g.setFont(f2);*/
g.drawString( " debug:"+mk.debug_data_count+ " LCD:" + mk.lcd_data_count + " vers:" + mk.version_data_count,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer1;
g.drawString( " other:"+mk.other_data_count+" params:"+mk.params_data_count,0,y_off,Graphics.TOP | Graphics.LEFT);
g.drawString( " other:"+mk.other_data_count+" params:"+mk.params_data_count + " GPS:"+mk.navi_data_count ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer1;
g.drawString( " debug_names:" + mk.debug_names_count + " angles:" + mk.angle_data_count ,0,y_off,Graphics.TOP | Graphics.LEFT);
 
 
 
 
case STATEID_SETTINGSMENU:
// falltru wanted
case STATEID_SELECT_PARAMSET:
750,9 → 783,12
g.drawString("time motor>15:" +(mk_stat.motor_on_time/1000) +"s" ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("time motor=15:" +(mk_stat.motor_stand_time/1000) +"s" ,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("act_lcd_page:" + mk.LCD.act_mk_page + "/" + mk.LCD.pages + " ( wanted: " + mk.LCD.act_user_page +")" ,0,y_off,Graphics.TOP | Graphics.LEFT);
 
}
 
 
y_off=this.getHeight()-4*lcd_img.getHeight();
for ( int foo=0;foo<4;foo++)
890,6 → 926,15
keycontrol_exit=0;
break;
 
case STATEID_READ_PARAMS:
user_intent=USER_INTENT_PARAMS;
lcd_lines=new String[2];
lcd_lines[0]="Reading Settings ";
lcd_lines[1]=mk.watchdog.act_paramset+"/5 |"+ (mk.watchdog.act_paramset>0?"#":"_") + (mk.watchdog.act_paramset>1?"#":"_") + (mk.watchdog.act_paramset>2?"#":"_")+ (mk.watchdog.act_paramset>3?"#":"_")+ (mk.watchdog.act_paramset>4?"#":"_") + "| ";
 
break;
 
 
case STATEID_SCANNING:
lcd_lines=new String[4];
lcd_lines[0]="Scanning for Devices";
928,7 → 973,13
 
 
case STATEID_MAINMENU:
menu_items=main_menu_items;
if (ufo_prober.is_navi())
menu_items=main_menu_items_navi;
else if (ufo_prober.is_mk())
menu_items=main_menu_items_mk;
else
menu_items=main_menu_items_no_connection;
 
lcd_lines=new String[menu_items.length];
break;
 
948,7 → 999,14
lcd_lines=new String[menu_items.length];
break;
 
case STATEID_RAWDEBUG:
user_intent=USER_INTENT_RAWDEBUG;
break;
 
}
 
 
 
// switch state
state=next_state;
1067,6 → 1125,31
}
switch(state)
{
case STATEID_GPSVIEW:
if (keyCode == this.KEY_NUM0)
mk.set_gps_target(mk.gps_position.Latitude,mk.gps_position.Longitude);
 
if (keyCode == this.KEY_NUM1)
mk.gps_position.push_wp();
 
 
switch (getGameAction (keyCode))
{
case UP:
if (act_wp!=0) act_wp--;
break;
case DOWN:
if (act_wp<mk.gps_position.last_wp) act_wp++;
 
break;
 
 
}
 
break;
case STATEID_RAWDEBUG:
switch (getGameAction (keyCode))
1085,6 → 1168,7
rawdebug_cursor_y++;
break;
 
 
}
break;
case STATEID_KEYCONTROL:
1218,54 → 1302,117
 
case STATEID_MAINMENU:
if ( getGameAction (keyCode)==FIRE )
{
 
if (ufo_prober.is_mk())
switch(act_menu_select)
{
case MAINMENU_CAMMODE:
case MAINMENU_MK_CAMMODE:
chg_state(STATEID_CAMMODE);
break;
 
case MAINMENU_SETTINGSMENU:
case MAINMENU_MK_SETTINGSMENU:
chg_state(STATEID_SETTINGSMENU);
break;
case MAINMENU_STICKS:
case MAINMENU_MK_STICKS:
chg_state(STATEID_STICKVIEW);
break;
 
case MAINMENU_KEYCONTROL:
case MAINMENU_MK_KEYCONTROL:
chg_state(STATEID_KEYCONTROL);
break;
case MAINMENU_TELEMETRY :
case MAINMENU_MK_TELEMETRY :
chg_state(STATEID_FLIGHTVIEW);
break;
 
case MAINMENU_MOTORTEST :
case MAINMENU_MK_MOTORTEST :
chg_state(STATEID_MOTORTEST);
break;
 
case MAINMENU_PARAMS :
chg_state(STATEID_SELECT_PARAMSET);
case MAINMENU_MK_PARAMS :
if (mk.watchdog.act_paramset<5)
chg_state(STATEID_READ_PARAMS);
else
chg_state(STATEID_SELECT_PARAMSET);
break;
 
 
case MAINMENU_PROXY:
case MAINMENU_MK_PROXY:
mk.do_proxy("socket://192.168.1.42:2323");
break;
 
case MAINMENU_DEVICESELECT:
case MAINMENU_MK_DEVICESELECT:
chg_state(STATEID_SCANNING);
break;
 
case MAINMENU_RAWDEBUG:
case MAINMENU_MK_RAWDEBUG:
chg_state(STATEID_RAWDEBUG);
break;
 
case MAINMENU_QUIT:
case MAINMENU_MK_QUIT:
// set quit Flag
quit=true;
break;
}
else if (ufo_prober.is_navi())
switch(act_menu_select)
{
 
 
case MAINMENU_NAVI_SETTINGS:
chg_state(STATEID_SETTINGSMENU);
break;
case MAINMENU_NAVI_TELEMETRY :
chg_state(STATEID_FLIGHTVIEW);
break;
 
case MAINMENU_NAVI_RAWDEBUG:
chg_state(STATEID_RAWDEBUG);
break;
 
case MAINMENU_NAVI_GPSVIEW:
chg_state(STATEID_GPSVIEW);
break;
 
case MAINMENU_NAVI_DEVICESELECT:
chg_state(STATEID_SCANNING);
break;
case MAINMENU_NAVI_QUIT:
// set quit Flag
quit=true;
break;
}
else
switch(act_menu_select)
{
 
 
 
case MAINMENU_NO_CONN_SETTINGS:
chg_state(STATEID_SETTINGSMENU);
break;
 
case MAINMENU_NO_CONN_DEVICESELECT:
chg_state(STATEID_SCANNING);
break;
 
case MAINMENU_NO_CONN_QUIT:
// set quit Flag
quit=true;
break;
 
}
}
else menu_keypress(keyCode);
break;
 
1297,6 → 1444,7
{
connect_mk("btspp://"+bt_scanner.remote_device_mac[act_menu_select] + ":1",bt_scanner.remote_device_name[act_menu_select]);
chg_state(STATEID_MAINMENU);
// keyCode=-1;
}
else
chg_state(STATEID_SCANNING);
/DUBwise/src/J2ME/src/DUBwiseDebug.java
17,6 → 17,8
 
 
public boolean showing=false;
public boolean paused=false;
 
public String debug_msg="";
 
private byte[] debug_screen_sequence={KEY_POUND,KEY_NUM4,KEY_NUM2};
23,17 → 25,24
private byte debug_screen_sequence_pos=0;
 
public final static int DEBUG_HISTORY_LENGTH=100;
public final static int DEBUG_HISTORY_LENGTH=1000;
 
public String[] debug_msgs;
 
public int debug_pos=0;
public int debug_paused_pos=0;
 
 
int y_off=0;
 
public DUBwiseDebug()
 
public DUBwiseCanvas canvas;
 
public DUBwiseDebug(DUBwiseCanvas canvas_)
{
canvas=canvas_;
 
debug_msgs=new String[DEBUG_HISTORY_LENGTH];
for (int tmp_i=0;tmp_i<DEBUG_HISTORY_LENGTH;tmp_i++)
debug_msgs[tmp_i]="";
41,11 → 50,12
 
public void log(String str)
{
 
debug_msgs[debug_pos]=str;
debug_pos++;
if (debug_pos==DEBUG_HISTORY_LENGTH)
debug_pos=0;
debug_msgs[debug_pos]=str;
debug_msgs[debug_pos]=str;
}
 
public void paint (Graphics g)
56,11 → 66,12
g.setFont(debug_font);
 
g.setColor(0x0000FF);
g.fillRect(0,0,this.getWidth(),this.getHeight());
g.fillRect(0,0,canvas.getWidth(),canvas.getHeight());
g.setColor(0xFFFFFF);
 
y_off=0;
for (int tmp_pos=debug_pos;((tmp_pos>0)&&(y_off<this.getHeight()));tmp_pos--)
if (!paused) debug_paused_pos=debug_pos;
for (int tmp_pos=debug_paused_pos;((tmp_pos>0)&&(y_off<canvas.getHeight()));tmp_pos--)
{
debug_msg=debug_msgs[tmp_pos];
String tmp_str="";
76,7 → 87,7
else
tmp_str+=debug_msg.charAt(tmp_i);
}
g.drawString(tmp_str,0,y_off,Graphics.TOP | Graphics.LEFT);
g.drawString(tmp_pos+" "+tmp_str,0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=debug_font.getHeight();
}
 
104,6 → 115,24
{
if (keyCode==KEY_STAR)
showing=false;
 
if (keyCode==KEY_NUM0)
paused=!paused;
 
 
switch (getGameAction (keyCode))
{
case UP:
debug_paused_pos++;
break;
case DOWN:
debug_paused_pos--;
break;
 
}
 
}
 
 
/DUBwise/src/J2ME/src/DUBwiseDefinitions.java
0,0 → 1,78
 
public interface DUBwiseDefinitions
{
// id for each state - must just be uniq - order isnt important
public final static int STATEID_SCANNING =0;
public final static int STATEID_DEVICESELECT =1;
public final static int STATEID_MAINMENU =2;
public final static int STATEID_MOTORTEST =3;
public final static int STATEID_SELECT_PARAMSET =4;
public final static int STATEID_EDIT_PARAMS =5;
public final static int STATEID_HANDLE_PARAMS =6;
public final static int STATEID_FLIGHTVIEW =7;
public final static int STATEID_RAWDEBUG =8;
public final static int STATEID_KEYCONTROL =9;
public final static int STATEID_SETTINGSMENU =10;
public final static int STATEID_STICKVIEW =11;
public final static int STATEID_CAMMODE =12;
public final static int STATEID_READ_PARAMS =13;
public final static int STATEID_GPSVIEW =14;
 
 
 
public boolean fullscreen=false;
public int act_motor=0;
public int act_motor_increase=0;
public boolean motor_test_sel_all=false;
 
 
public String[] main_menu_items_no_connection= { "Tool Settings","Change Device" , "Quit " };
 
 
public final static int MAINMENU_NO_CONN_SETTINGS =0;
public final static int MAINMENU_NO_CONN_DEVICESELECT =1+MAINMENU_NO_CONN_SETTINGS ;
public final static int MAINMENU_NO_CONN_QUIT =1+MAINMENU_NO_CONN_DEVICESELECT;
 
 
public String[] main_menu_items_mk={"Telemetry","Raw Debug", "view RC-data", "MK-KeyControl", "Motor Test" , "Flight Settings","Tool Settings","Remote Cam","Proxy","Change Device" , "Quit " };
 
 
public final static int MAINMENU_MK_TELEMETRY =0;
public final static int MAINMENU_MK_RAWDEBUG =1+MAINMENU_MK_TELEMETRY;
public final static int MAINMENU_MK_STICKS =1+MAINMENU_MK_RAWDEBUG;
public final static int MAINMENU_MK_KEYCONTROL =1+MAINMENU_MK_STICKS;
public final static int MAINMENU_MK_MOTORTEST =1+MAINMENU_MK_KEYCONTROL;
public final static int MAINMENU_MK_PARAMS =1+MAINMENU_MK_MOTORTEST;
public final static int MAINMENU_MK_SETTINGSMENU =1+MAINMENU_MK_PARAMS;
public final static int MAINMENU_MK_CAMMODE =1+MAINMENU_MK_SETTINGSMENU;
public final static int MAINMENU_MK_PROXY =1+MAINMENU_MK_CAMMODE;
public final static int MAINMENU_MK_DEVICESELECT =1+MAINMENU_MK_PROXY;
public final static int MAINMENU_MK_QUIT =1+MAINMENU_MK_DEVICESELECT;
 
 
public String[] main_menu_items_navi={"Telemetry","Raw Debug", "view GPS-Data" ,"Tool Settings","Change Device" , "Quit " };
 
public final static int MAINMENU_NAVI_TELEMETRY =0;
public final static int MAINMENU_NAVI_RAWDEBUG =1+MAINMENU_NAVI_TELEMETRY;
public final static int MAINMENU_NAVI_GPSVIEW =1+MAINMENU_NAVI_RAWDEBUG;
public final static int MAINMENU_NAVI_SETTINGS =1+MAINMENU_NAVI_GPSVIEW ;
public final static int MAINMENU_NAVI_DEVICESELECT =1+MAINMENU_NAVI_SETTINGS;
public final static int MAINMENU_NAVI_QUIT =1+MAINMENU_NAVI_DEVICESELECT;
 
 
 
 
 
public String[] settings_menu_items={"Skin ","Sound ","Vibra " ,"Graph ","FullScreen " ,"Keep BGLight " ,"Back" };
public final static int SETTINGSMENU_CHANGESKIN =0;
public final static int SETTINGSMENU_SOUNDTOGGLE =1;
public final static int SETTINGSMENU_VIBRATOGGLE =2;
public final static int SETTINGSMENU_GRAPHTOGGLE =3;
public final static int SETTINGSMENU_FULLSCREENTOGGLE =4;
public final static int SETTINGSMENU_LIGHTTOGGLE =5;
public final static int SETTINGSMENU_BACK =6;
 
public final static int USER_INTENT_NONE=0;
public final static int USER_INTENT_RAWDEBUG=1;
public final static int USER_INTENT_PARAMS=2;
}
/DUBwise/src/J2ME/src/MKCommunicator.java
12,6 → 12,7
import javax.microedition.io.*;
import java.io.*;
 
 
public class MKCommunicator
implements Runnable
{
18,18 → 19,19
/***************** Section: public Attributes **********************************************/
public boolean connected=false; // flag for the connection state
public boolean fatal=false; // flag which is set when an error is so fatal that reconnecting won't be tried - e.g. unknown version number.
 
 
public String mk_url=""; // buffer the url which is given in the constuctor for reconnectin purposes
public MKLCD LCD;
public MKVersion version;
public MKDebugData debug_data;
 
public MKGPSPosition gps_position;
 
public MKStickData stick_data;
public MKParamsParser params;
public MKWatchDog watchdog;
public MKProxy proxy=null;
 
public long connection_start_time=-1;
 
43,18 → 45,24
String p_msg="--";
public String msg="BT_INIT";
 
 
 
// for statistics
public int debug_data_count=0;
public int debug_names_count=0;
public int angle_data_count=0;
public int version_data_count=0;
public int other_data_count=0;
public int lcd_data_count=0;
public int params_data_count=0;
public int navi_data_count=0;
 
 
 
String name;
DUBwise root;
 
 
DUBwiseDebug debug;
 
/****************** Section: public Methods ************************************************/
public MKCommunicator(DUBwise root_,DUBwiseDebug debug_)
{
66,14 → 74,16
params=new MKParamsParser();
LCD= new MKLCD(this);
watchdog=new MKWatchDog(this);
gps_position=new MKGPSPosition();
new Thread( this ).start(); // fire up main Thread
}
 
 
public void do_proxy(String proxy_url)
public void do_proxy(String proxy_url)
{
proxy=new MKProxy(proxy_url);
}
 
// URL string: "btspp://XXXXXXXXXXXX:1" - the X-Part is the MAC-Adress of the Bluetooth-Device connected to the Fligth-Control
public void connect_to(String _url,String _name)
84,6 → 94,10
connected=false;
}
 
public boolean ready()
{
return (connected&&(version.major!=-1));
}
/****************** Section: private Methods ************************************************/
private void connect()
{
95,7 → 109,6
reader=connection.openInputStream();
writer=connection.openOutputStream();
 
 
//
String magic="\rmk-mode\r";
writer.write(magic.getBytes());
123,8 → 136,6
 
}
 
 
public int[] Decode64(int[] in_arr, int offset,int len)
{
int ptrIn=offset;
135,10 → 146,17
 
while(len!=0)
{
a=0;
b=0;
c=0;
d=0;
try {
a = in_arr[ptrIn++] - '=';
b = in_arr[ptrIn++] - '=';
c = in_arr[ptrIn++] - '=';
d = in_arr[ptrIn++] - '=';
}
catch (Exception e) {}
//if(ptrIn > max - 2) break; // nicht mehr Daten verarbeiten, als empfangen wurden
 
x = (a << 2) | (b >> 4);
157,6 → 175,18
// FC - Function Mappers
 
// send a version Request to the FC - the reply to this request will be processed in process_data when it arrives
public void set_gps_target(int longitude,int latitude)
{
int[] target=new int[8];
target[0]= (0xFF)&(longitude<<24);
target[1]= (0xFF)&(longitude<<16);
target[2]= (0xFF)&(longitude<<8);
target[3]= (0xFF)&(longitude);
 
send_command(0,'s',target);
}
 
 
public void get_version()
{
send_command(0,'v',new int[0]);
179,7 → 209,7
int[] params=new int[1];
params[0]=id;
 
while(sending)
while(sending||recieving)
{try { Thread.sleep(50); }
catch (Exception e) { }
}
193,7 → 223,7
int[] params=new int[1];
params[0]=id;
 
while(sending)
while(sending||recieving)
{try { Thread.sleep(50); }
catch (Exception e) { }
}
206,22 → 236,25
 
public void trigger_LCD(int key)
{
if (sending) return;
while(sending||recieving)
{try { Thread.sleep(50); }
catch (Exception e) { }
}
 
//if (sending||recieving) return;
int[] params=new int[3];
params[0]=key;
params[1]=0;
params[2]=0;
send_command(0,'h',params);
}
 
 
public void write_params()
{
while(sending)
while(sending||recieving)
{try { Thread.sleep(50); }
catch (Exception e) { }
}
231,10 → 264,12
 
 
boolean sending=false;
boolean recieving=false;
 
// send command to FC ( add crc and pack into pseudo Base64
public void send_command(int modul,char cmd,int[] params)
{
// if (modul==0) return;
sending=true;
char[] send_buff=new char[5 + (params.length/3 + (params.length%3==0?0:1) )*4]; // 5=1*start_char+1*addr+1*cmd+2*crc
send_buff[0]='#';
285,9 → 320,13
}
 
 
public int slave_addr=-1;
 
public void process_data(int[] data,int len)
{
 
slave_addr=data[1];
 
switch((char)data[2])
{
297,7 → 336,7
break;
 
case 'A': // debug Data Names
//debug_data_count++;
debug_names_count++;
debug_data.set_names_by_mk_data(data[1]-'0',Decode64(data,3,len-3));
break;
321,25 → 360,51
tmp_s+="s"+tmp_c+"v"+stick_data.stick[tmp_c]+" ";
debug.log(tmp_s);
break;
 
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
//int[] foo=Decode64(data,3,len-3);
params.set_by_mk_data((int)(data[2]-'L'),Decode64(data,3,len-3),version);
params_data_count++;
break;
 
 
 
// data from navi
case 'Q':
navi_data_count++;
debug.log("got navi data(" + len +"):");
 
gps_position.set_by_mk_data(Decode64(data,3,len-3),version);
 
debug.log("long:" + gps_position.Longitude);
debug.log("lat:" + gps_position.Latitude);
 
root.canvas.ufo_prober.set_to_navi();
break;
 
 
case 'w':
angle_data_count++;
root.canvas.ufo_prober.set_to_mk();
debug.log("got angle data:");
 
break;
default:
other_data_count++;
debug.log("got other data:" + (char)data[2] + "=>" + (byte)data[2]);
debug.log("got other data:"+ (char)data[2] + "=>" + (byte)data[2]);
 
 
/*
String tmp_str="";
for (int tmp_i=0;tmp_i<len;tmp_i++)
tmp_str+=(char)data[tmp_i];
debug.log(tmp_str);
debug.log(tmp_str);*/
break;
 
}
355,7 → 420,7
 
public void close_connections(boolean force)
{
if ((!force)&&root.canvas.do_vibra) root.vibrate(500);
// if ((!force)&&root.canvas.do_vibra) root.vibrate(500);
force_disconnect=force;
try{ reader.close(); }
catch (Exception inner_ex) { }
372,12 → 437,14
// Thread to recieve data from Connection
public void run()
{
int[] data_set=new int[150];
int[] data_set=new int[300];
int input;
int pos=0;
msg+="!!run started!!";
 
debug.log("Thread started");
while(true)
{
debug.log("Connection Thread run");
if (!connected)
{
if (!force_disconnect) connect();
384,25 → 451,38
}
else
try{
 
while(sending)
{try { Thread.sleep(50); }
catch (Exception e) { }
}
 
 
recieving=true;
debug.log("Connected - reading data");
pos=0;
input=0;
// recieve data-set
while ((input != 13)) // &&(input!=-1))
while ((input != 13)) //&&(input!=-1))
{
 
input = reader.read() ;
if (proxy!=null)
proxy.writer.write(input);
// if (input==-1) throw new Exception("test");
if (input==-1) throw new Exception("test");
if (input!=-1)
{
data_set[pos]=input;
pos++;
}
}
 
recieving=false;
debug.log("Data recieved (" + pos + "Bytes) - processing ..");
/*
if (proxy!=null)
{
proxy.writer.write('\r');
409,10 → 489,12
proxy.writer.write('\n');
proxy.writer.flush();
}
 
*/
if (pos>5)
process_data(data_set,pos);
debug.log("Processing done");
 
}
catch (Exception ex)
{
424,12 → 506,14
 
}
// sleep a bit to get someting more done
// sleep a bit to get someting more done
try { Thread.sleep(50); }
catch (Exception e) { }
} // while
 
// debug.log("Leaving Communicator thread");
 
} // run()
 
/DUBwise/src/J2ME/src/MKDebugData.java
65,7 → 65,7
if (version.compare(-1,-1)==version.VERSION_EQUAL)
return;
 
if (version.compare(0,60)==version.VERSION_PREVIOUS)
// if (version.compare(0,60)==version.VERSION_PREVIOUS)
{
for (i=0;i<32;i++)
{
75,7 → 75,7
analog[i]=-(analog[i]&(0xFFFF-1))^(0xFFFF-1);
}
}
else
/*else
{
for (i=0;i<16;i++)
{
84,7 → 84,7
analog[i]=-(analog[i]&(0xFFFF-1))^(0xFFFF-1);
}
}
 
*/
motor_complete=motor_val(0)+motor_val(1)+motor_val(2)+motor_val(3);
 
 
/DUBwise/src/J2ME/src/MKGPSPosition.java
0,0 → 1,117
/*********************************************
*
* class representing the DebugData Structure
*
* Author: Marcus -LiGi- Bueschleb
*
* see README for further Infos
*
********************************************/
 
public class MKGPSPosition
 
{
 
public final static int MAX_WAYPOINTS=100;
 
int[] LongWP;
int[] LatWP;
 
int last_wp=0;
 
 
int Longitude;
int Latitude;
 
int TargetLongitude;
int TargetLatitude;
 
int Distance2Target;
int Angle2Target;
 
byte Used_Sat;
 
 
public void push_wp()
{
LongWP[last_wp]=Longitude;
LatWP[last_wp]=Latitude;
last_wp++;
}
 
 
public String dec_to_min_sec(int val)
{
return "" + val/10000000 + "^" + ((val%10000000)*60)/10000000 + "'" + ((((val%10000000)*60)%10000000)*60)/10000000 + "." + ((((val%10000000)*60)%10000000)*60)%10000000;
}
 
 
public String WP_Latitude_min_sec(int id)
{
return "" + dec_to_min_sec(LatWP[id])+ "''N" ;
}
 
public String WP_Longitude_min_sec(int id)
{
return "" + dec_to_min_sec(LongWP[id])+ "''E" ;
 
}
 
 
 
public String Latitude_min_sec()
{
return "" + dec_to_min_sec(Latitude)+ "''N" ;
}
 
public String Longitude_min_sec()
{
return "" + dec_to_min_sec(Longitude)+ "''E" ;
 
}
 
public String Latitude_str()
{
return "" + Latitude/10000000 + "." +Latitude%10000000 ;
}
 
public String Longitude_str()
{
return "" + Longitude/10000000 + "." +Longitude%10000000 ;
}
 
public MKGPSPosition()
{
 
LongWP=new int[MAX_WAYPOINTS];
LatWP=new int[MAX_WAYPOINTS];
 
}
 
private int parse_arr(int offset,int[] in_arr)
{
return ((in_arr[offset+3]<<24) |
(in_arr[offset+2]<<16) |
(in_arr[offset+1]<<8) |
(in_arr[offset+0]));
}
 
public void set_by_mk_data(int[] in_arr,MKVersion version)
{
Longitude=parse_arr(0,in_arr);
Latitude=parse_arr(4,in_arr);
 
TargetLongitude=parse_arr(8,in_arr);
TargetLatitude=parse_arr(12,in_arr);
 
Distance2Target=parse_arr(16,in_arr);
Angle2Target=parse_arr(20,in_arr);
Used_Sat=(byte)in_arr[24];
 
}
 
 
 
}
/DUBwise/src/J2ME/src/MKLCD.java
9,7 → 9,7
*******************************************/
 
public class MKLCD
implements Runnable
// implements Runnable
{
 
MKCommunicator mk=null;
45,9 → 45,9
}
 
mk=_mk;
new Thread( this ).start(); // fire up main Thread
// new Thread( this ).start(); // fire up main Thread
}
 
/*
public void run()
{
while(true)
54,13 → 54,13
{
try {
if (mk.connected)
trigger_LCD();
Thread.sleep(100);
Thread.sleep(300);
}
catch (Exception e) { }
}
}
 
*/
public void set_page(int page)
{
act_user_page=page;
92,9 → 92,11
{
if (act_mk_page<act_user_page)
act_key=2;
else
if (act_mk_page>act_user_page)
act_key=1;
if (act_mk_page==act_user_page)
act_key=0;
 
}
132,10 → 134,6
 
 
 
 
 
 
public void LCD_NEXTPAGE()
{
if (act_user_page!=pages)
/DUBwise/src/J2ME/src/MKParamsParser.java
13,7 → 13,7
 
{
 
 
/* old
// -- start generated code --
public final static int PARAMTYPE_BYTE=0;
public final static int PARAMTYPE_BITSWITCH=1;
26,9 → 26,25
public final static int[] all_lengths={58,58,65,70};
// -- end generated code --
 
*/
 
 
// -- start generated code --
public final static int PARAMTYPE_BYTE=0;
public final static int PARAMTYPE_BITSWITCH=1;
public final static int PARAMTYPE_STICK=2;
public final static String[][] all_tab_names={{"Altitude","Camera","Channels","Configuration","Gyro","Other","Stick","User"},{"Altitude","Camera","Channels","Configuration","Gyro","Looping","Other","Stick","User"},{"Altitude","Camera","Channels","Configuration","Coupling","Gyro","Looping","Other","Stick","User"},{"Altitude","Camera","Channels","Configuration","Coupling","Gyro","Looping","Other","Stick","User"},{"Altitude","Camera","Channels","Configuration","Coupling","Gyro","Looping","Navi","Other","Output","Stick","User"}};
public final static String[][][] all_field_names={{{"Min. Accelerate","Barometric D","Setpoint","Altitude P","Gain","Z-ACC"},{"Servo control","Nick compensation","Servo min","Servo max","Refresh rate","Invert Direction"},{"Nick","Roll","Accelerate","Gier","POTI1","POTI2","POTI3","POTI4"},{"ALTITUDE_CONTROL","Switch for Setpoint","Heading Hold","Compas Active","GPS"},{"ACC/Gyro Factor","P-Rate","I-Rate"},{"Min Gas","Max Gas","Compass Effect","Voltage Warning","Distress Gas","Distress Gas Time"},{"Nick/Roll P","Nick/Roll D","Gier P"},{"Param 1","Param 2","Param 3","Param 4"}},{{"Min. Accelerate","Barometric D","Setpoint","Altitude P","Gain","Z-ACC"},{"Servo control","Nick compensation","Servo min","Servo max","Refresh rate","Invert Direction"},{"Nick","Roll","Accelerate","Gier","POTI1","POTI2","POTI3","POTI4"},{"ALTITUDE_CONTROL","Switch for Setpoint","Heading Hold","Compas Active","GPS"},{"ACC/Gyro Factor","P-Rate","I-Rate"},{"Gas Limit","Threshold","UP","DOWN","LEFT","RIGHT"},{"Min Gas","Max Gas","Compass Effect","Voltage Warning","Distress Gas","Distress Gas Time"},{"Nick/Roll P","Nick/Roll D","Gier P"},{"Param 1","Param 2","Param 3","Param 4"}},{{"Min. Accelerate","Barometric D","Setpoint","Altitude P","Gain","Z-ACC"},{"Servo control","Nick compensation","Servo min","Servo max","Refresh rate","Invert Direction"},{"Nick","Roll","Accelerate","Gier","POTI1","POTI2","POTI3","POTI4"},{"ALTITUDE_CONTROL","Switch for Setpoint","Heading Hold","Compas Active","Compas Fix","GPS","Coupling","Yaw Rate Limiter"},{"Yaw pos. feedback","Yaw neg. feedback"},{"ACC/Gyro Factor","P-Rate","I-Rate","ACC/Gyro Comp","Drift-Compensation"},{"Gas Limit","Threshold","Hysterese","TurnOver Nick","TurnOver Roll","UP","DOWN","LEFT","RIGHT"},{"Min Gas","Max Gas","Compass Effect","Voltage Warning","Distress Gas","Distress Gas Time"},{"Nick/Roll P","Nick/Roll D","Gier P"},{"Param 1","Param 2","Param 3","Param 4"}},{{"Min. Accelerate","Barometric D","Setpoint","Altitude P","Gain","Z-ACC"},{"Servo control","Nick compensation","Servo min","Servo max","Refresh rate","Invert Direction"},{"Nick","Roll","Accelerate","Gier","POTI1","POTI2","POTI3","POTI4"},{"ALTITUDE_CONTROL","Switch for Setpoint","Heading Hold","Compas Active","Compas Fix","GPS","Coupling","Yaw Rate Limiter"},{"Yaw pos. feedback","Yaw neg. feedback"},{"ACC/Gyro Factor","P-Rate","I-Rate","ACC/Gyro Comp","Drift-Compensation","Dynamic stability"},{"Gas Limit","Threshold","Hysterese","TurnOver Nick","TurnOver Roll","UP","DOWN","LEFT","RIGHT"},{"Min Gas","Max Gas","Compass Effect","Voltage Warning","Distress Gas","Distress Gas Time"},{"Nick/Roll P","Nick/Roll D","Gier P"},{"Param 1","Param 2","Param 3","Param 4","Param 5","Param 6","Param 7","Param 8"}},{{"Min. Accelerate","Barometric D","Setpoint","Altitude P","Gain","Z-ACC"},{"Servo control","Nick compensation","Servo min","Servo max","Refresh rate","Invert Direction"},{"Nick","Roll","Accelerate","Gier","POTI1","POTI2","POTI3","POTI4"},{"ALTITUDE_CONTROL","Switch for Setpoint","Heading Hold","Compas Active","Compas Fix","GPS","Coupling","Yaw Rate Limiter"},{"Yaw pos. feedback","Yaw neg. feedback"},{"ACC/Gyro Factor","P-Rate","I-Rate","ACC/Gyro Comp","Drift-Compensation","Dynamic stability"},{"Gas Limit","Threshold","Hysterese","TurnOver Nick","TurnOver Roll","UP","DOWN","LEFT","RIGHT"},{"Mode Control","GPS-Gain","GPS-P","GPS-I","GPS-D","GPS-ACC","Satelite Minimum","Stick Threhsold"},{"Min Gas","Max Gas","Compass Effect","Voltage Warning","Distress Gas","Distress Gas Time"},{"J16 Bitmask","J16 Timing","J17 Bitmask","J17 Timing"},{"Nick/Roll P","Nick/Roll D","Gier P","External Control"},{"Param 1","Param 2","Param 3","Param 4","Param 5","Param 6","Param 7","Param 8"}}};
public final static int[][][] all_field_positions={{{9,10,11,12,13,14},{33,34,35,36,37,304},{0,1,2,3,4,5,6,7},{64,65,66,67,69},{20,22,23},{18,19,21,24,25,26},{15,16,17},{29,30,31,32}},{{9,10,11,12,13,14},{33,34,35,36,37,328},{0,1,2,3,4,5,6,7},{64,65,66,67,69},{20,22,23},{38,39,320,321,322,323},{18,19,21,24,25,26},{15,16,17},{29,30,31,32}},{{9,10,11,12,13,14},{33,34,35,36,37,384},{0,1,2,3,4,5,6,7},{64,65,66,67,68,69,70,71},{41,42},{20,22,23,45,46},{38,39,40,43,44,376,377,378,379},{18,19,21,24,25,26},{15,16,17},{29,30,31,32}},{{9,10,11,12,13,14},{33,34,35,36,37,424},{0,1,2,3,4,5,6,7},{64,65,66,67,68,69,70,71},{41,42},{20,22,23,45,46,47},{38,39,40,43,44,416,417,418,419},{18,19,21,24,25,26},{15,16,17},{29,30,31,32,48,49,50,51}},{{9,10,11,12,13,14},{33,34,35,36,37,528},{0,1,2,3,4,5,6,7},{64,65,66,67,68,69,70,71},{41,42},{20,22,23,45,46,47},{38,39,40,43,44,520,521,522,523},{56,57,58,59,60,61,62,63},{18,19,21,24,25,26},{52,53,54,55},{15,16,17,64},{29,30,31,32,48,49,50,51}}};
public final static int[][][] all_field_types={{{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BITSWITCH},{PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK},{PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE}},{{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BITSWITCH},{PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK},{PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE}},{{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BITSWITCH},{PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK},{PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH},{PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE}},{{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BITSWITCH},{PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK},{PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH},{PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE}},{{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BITSWITCH},{PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK,PARAMTYPE_STICK},{PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH},{PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE},{PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE}}};
public final static int[] all_name_positions={46,46,53,58,71};
public final static int[] all_lengths={58,58,65,70,83};
// -- end generated code --
 
 
 
public final static int MAX_PARAMSETS=20;
public final static int MAX_PARAMLENGTH=100;
// public final static int MAX_PARAMLENGTH=100;
 
public int[][] field;
public String[] names={"Paramset 1","Paramset 2","Paramset 3","Paramset 4","Paramset 5"};
69,7 → 85,7
}
 
//<--generated
public static final int COMP_COUNT=3;
// public static final int COMP_COUNT=3;
 
// public string[COMP_COUNT] categorys;
 
91,7 → 107,7
 
public void set_by_mk_data(int paramset_num,int[] in_arr,MKVersion version)
{
 
tab_names=all_tab_names[version.compatible-4];
field_names=all_field_names[version.compatible-4];
field_positions=all_field_positions[version.compatible-4];
102,7 → 118,7
 
field[paramset_num]=new int[length];
 
for ( int i=0;i<length;i++)
for ( int i=0;i<length;i++)
field[paramset_num][i]=in_arr[i];
names[paramset_num]="" + (paramset_num+1) +": ";
for ( int i=name_start;i<length;i++)
/DUBwise/src/J2ME/src/MKWatchDog.java
10,7 → 10,7
**************************************/
 
public class MKWatchDog
implements Runnable
implements Runnable,DUBwiseDefinitions
{
 
MKCommunicator mk=null;
26,37 → 26,84
new Thread( this ).start(); // fire up main Thread
}
 
int lcd_timeout=0; // detect if we lost packets
 
public int act_paramset=0;
 
public void run()
{
 
 
// get all params
int act_debug_name=0;
 
 
while(true)
{
try { Thread.sleep(3000); }
 
try { Thread.sleep(30); } // 3000
catch (Exception e) { }
if (mk.connected&&(!mk.force_disconnect))
{
 
if ( mk.version.major==-1 )
{
try { Thread.sleep(150); }
catch (Exception e) { }
mk.get_version();
}
else if ((act_paramset<5)&&(mk.root.canvas.user_intent==USER_INTENT_PARAMS) &&(! mk.root.canvas.ufo_prober.is_navi()))
{
mk.get_params(act_paramset+1);
try { Thread.sleep(450); }
catch (Exception e) { }
if(mk.params.field[act_paramset]!=null)
act_paramset++;
}
else if (( act_debug_name<32)&&(mk.root.canvas.user_intent==USER_INTENT_RAWDEBUG))
{
mk.get_debug_name(act_debug_name);
try { Thread.sleep(350); }
catch (Exception e) { }
 
if (mk.debug_data.got_name[act_debug_name]) act_debug_name++;
}
 
 
 
 
/*
 
 
if (debug_data_count_buff==mk.debug_data_count)
{
// mk.close_connections(false);
}
if ((lcd_data_count_buff==mk.lcd_data_count)||(mk.lcd_data_count==0))
mk.LCD.trigger_LCD();
debug_data_count_buff=mk.debug_data_count;
lcd_data_count_buff=mk.lcd_data_count;
 
*/
 
if (mk.version.major==-1)
/*if (mk.version.major==-1)
mk.get_version();
 
for ( int cnt=0;cnt<5;cnt++)
else
*/
/*for ( int cnt=0;cnt<5;cnt++)
if (mk.params.field[cnt]==null)
{
mk.get_params(cnt+1);
break;
}
 
}*/
/*
for (int c=0;c<32;c++)
if (!mk.debug_data.got_name[c])
{
63,7 → 110,24
mk.get_debug_name(c);
break;
}
*/
 
else if ((lcd_data_count_buff!=mk.lcd_data_count)||(mk.lcd_data_count==0)||(lcd_timeout==23))
{
lcd_timeout=0;
lcd_data_count_buff=mk.lcd_data_count;
mk.LCD.trigger_LCD();
try { Thread.sleep(50); }
catch (Exception e) { }
//debug_data_count_buff=mk.debug_data_count;
}
else
{
lcd_timeout++;
}
 
}
/DUBwise/src/J2ME/src/UFOProber.java
15,11 → 15,53
public class UFOProber
 
{
public final static int PROBE_RESULT_NONE=0;
public final static int PROBE_RESULT_MK=1;
public final static int PROBE_RESULT_NG=2;
public final static int PROBE_RESULT_NONE =0;
public final static int PROBE_RESULT_MK =1;
public final static int PROBE_RESULT_NG =2;
public final static int PROBE_RESULT_NAVCTRL =3;
 
 
public boolean change_notify=false;
 
public String[] extended_names= { "No Device" , "MK-Connection" , "NG-Connection" , "NavCtrl-Connection" };
 
public int probe_result=PROBE_RESULT_NONE;
 
 
public void set_to_navi()
{
if (probe_result!=PROBE_RESULT_NAVCTRL);
{
probe_result=PROBE_RESULT_NAVCTRL;
change_notify=true;
}
}
 
public void set_to_mk()
{
if (probe_result!=PROBE_RESULT_MK)
{
probe_result=PROBE_RESULT_MK;
change_notify=true;
}
}
 
public boolean is_navi()
{
return (probe_result==PROBE_RESULT_NAVCTRL);
}
 
public boolean is_mk()
{
return (probe_result==PROBE_RESULT_MK);
}
 
 
public String extended_name()
{
return extended_names[probe_result];
}
 
String reply="";
public boolean probe_error=false;