/DUBwise/trunk/android/AndroidManifest.xml |
---|
48,7 → 48,17 |
</intent-filter> |
</activity> |
<activity android:name=".SettingsActivity" |
android:label="@string/app_name" |
> |
<intent-filter> |
<action android:name="android.intent.action.MAIN" /> |
</intent-filter> |
</activity> |
<activity android:name=".RCDataActivity" |
android:label="@string/app_name" |
> |
/DUBwise/trunk/android/res/layout/settings.xml |
---|
0,0 → 1,52 |
<?xml version="1.0" encoding="utf-8"?> |
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" |
android:orientation="vertical" |
android:layout_width="fill_parent" |
android:layout_height="fill_parent"> |
<LinearLayout |
android:orientation="vertical" |
android:layout_width="fill_parent" |
android:layout_height="wrap_content"> |
<CheckBox android:id="@+id/check_fullscreen" |
android:paddingBottom="24sp" |
android:paddingTop="24sp" |
android:layout_width="wrap_content" |
android:layout_height="wrap_content" |
android:text="Fullscreen" /> |
<View |
android:layout_height="2px" |
android:layout_width="fill_parent" |
android:background="#DDFFDD" |
android:layout_marginTop="5dip" |
android:layout_marginBottom="5dip"/> |
<TextView |
android:layout_width="fill_parent" |
android:layout_height="wrap_content" |
android:layout_marginTop="5dip" |
android:text="Front:" |
android:textAppearance="?android:attr/textAppearanceLarge" |
android:focusable="true" |
/> |
</LinearLayout> |
</ScrollView> |
/DUBwise/trunk/android/src/org/ligi/android/DUBwise.java |
---|
55,8 → 55,8 |
boolean do_sound; |
boolean fullscreen; |
MKCommunicator mk; |
String[] menu_items = new String[]{"Connection", "Old Interface" , "View On Maps", "Flight Settings","RCData","Motor Test", "About","Quit"}; |
int[] menu_actions= new int[]{ACTIONID_CONN , ACTIONID_OLDINTERFACE , ACTIONID_MAPS ,ACTIONID_FLIGHTSETTINGS,ACTIONID_RCDATA,ACTIONID_MOTORTEST, ACTIONID_ABOUT , ACTIONID_QUIT }; |
String[] menu_items = new String[]{"Settings","Connection", "Old Interface" , "View On Maps", "Flight Settings","RCData","Motor Test", "About","Quit"}; |
int[] menu_actions= new int[]{ACTIONID_SETTINGS,ACTIONID_CONN , ACTIONID_OLDINTERFACE , ACTIONID_MAPS ,ACTIONID_FLIGHTSETTINGS,ACTIONID_RCDATA,ACTIONID_MOTORTEST, ACTIONID_ABOUT , ACTIONID_QUIT }; |
public final static int ACTIONID_CONN=0; |
public final static int ACTIONID_MAPS=1; |
65,6 → 65,7 |
public final static int ACTIONID_FLIGHTSETTINGS=4; |
public final static int ACTIONID_MOTORTEST=5; |
public final static int ACTIONID_RCDATA=6; |
public final static int ACTIONID_SETTINGS=7; |
public final static int ACTIONID_QUIT=100; |
SharedPreferences settings; |
112,6 → 113,12 |
switch(menu_actions[position]) |
{ |
case ACTIONID_SETTINGS: |
// setContentView(new ConnectionView(this)); |
startActivity(new Intent(this, SettingsActivity.class)); |
break; |
case ACTIONID_CONN: |
// setContentView(new ConnectionView(this)); |
/DUBwise/trunk/android/src/org/ligi/android/R.java |
---|
20,6 → 20,7 |
public static final class id { |
public static final int cancel_btn=0x7f060004; |
public static final int check_autoconn=0x7f060002; |
public static final int check_fullscreen=0x7f060015; |
public static final int check_fullspeed=0x7f060005; |
public static final int edit_host=0x7f060000; |
public static final int edit_port=0x7f060001; |
44,6 → 45,7 |
public static final int connection=0x7f030000; |
public static final int motortest=0x7f030001; |
public static final int rcdata=0x7f030002; |
public static final int settings=0x7f030003; |
} |
public static final class raw { |
public static final int voice_sample_01=0x7f040000; |
/DUBwise/trunk/android/src/org/ligi/android/SettingsActivity.java |
---|
0,0 → 1,79 |
package org.ligi.android; |
import android.app.ListActivity; |
import android.content.Intent; |
import android.content.pm.PackageManager; |
import android.content.pm.ResolveInfo; |
import android.os.Bundle; |
import android.view.View; |
import android.widget.ListView; |
import android.widget.SimpleAdapter; |
import android.util.Log; |
import android.app.Activity; |
import android.os.Bundle; |
import android.view.View; |
import android.widget.ListView; |
import android.widget.SimpleAdapter; |
import java.text.Collator; |
import java.util.ArrayList; |
import java.util.Collections; |
import java.util.Comparator; |
import java.util.HashMap; |
import java.util.List; |
import java.util.Map; |
import android.net.Uri; |
import java.net.URISyntaxException; |
import android.widget.*; |
import android.content.DialogInterface; |
import android.content.Context.*; |
import android.widget.EditText; |
import android.text.method.NumberKeyListener; |
import com.google.android.maps.MapView; |
import android.app.AlertDialog.*; |
import android.app.AlertDialog; |
import android.content.SharedPreferences; |
import org.ligi.ufo.*; |
public class SettingsActivity extends Activity |
{ |
CheckBox fullscreen; |
AndroidMKCommunicator mk; |
@Override |
public void onCreate(Bundle savedInstanceState) { |
super.onCreate(savedInstanceState); |
setContentView(R.layout.settings); |
fullscreen=(CheckBox)findViewById( R.id.check_fullscreen); |
} |
@Override |
protected void onDestroy() |
{ |
super.onDestroy(); |
} |
} |
/DUBwise/trunk/android/src/org/ligi/android/SettingsActivity.xml |
---|
0,0 → 1,138 |
package org.ligi.android; |
import android.app.ListActivity; |
import android.content.Intent; |
import android.content.pm.PackageManager; |
import android.content.pm.ResolveInfo; |
import android.os.Bundle; |
import android.view.View; |
import android.widget.ListView; |
import android.widget.SimpleAdapter; |
import android.util.Log; |
import android.app.Activity; |
import android.os.Bundle; |
import android.view.View; |
import android.widget.ListView; |
import android.widget.SimpleAdapter; |
import java.text.Collator; |
import java.util.ArrayList; |
import java.util.Collections; |
import java.util.Comparator; |
import java.util.HashMap; |
import java.util.List; |
import java.util.Map; |
import android.net.Uri; |
import java.net.URISyntaxException; |
import android.widget.*; |
import android.content.DialogInterface; |
import android.content.Context.*; |
import android.widget.EditText; |
import android.text.method.NumberKeyListener; |
import com.google.android.maps.MapView; |
import android.app.AlertDialog.*; |
import android.app.AlertDialog; |
import android.content.SharedPreferences; |
import org.ligi.ufo.*; |
public class MotorTestActivity extends Activity |
implements SeekBar.OnSeekBarChangeListener |
{ |
SeekBar seek_right,seek_left,seek_front,seek_back,seek_all; |
CheckBox full_speed; |
boolean toasted=false; |
AndroidMKCommunicator mk; |
@Override |
public void onCreate(Bundle savedInstanceState) { |
super.onCreate(savedInstanceState); |
mk= new AndroidMKCommunicator(this); |
setContentView(R.layout.motortest); |
seek_right=(SeekBar)findViewById( R.id.seek_right); |
seek_left=(SeekBar)findViewById( R.id.seek_left); |
seek_front=(SeekBar)findViewById( R.id.seek_front); |
seek_back=(SeekBar)findViewById( R.id.seek_back); |
seek_all=(SeekBar)findViewById( R.id.seek_all); |
full_speed=(CheckBox)findViewById( R.id.check_fullspeed); |
seek_right.setOnSeekBarChangeListener(this); |
seek_left.setOnSeekBarChangeListener(this); |
seek_front.setOnSeekBarChangeListener(this); |
seek_back.setOnSeekBarChangeListener(this); |
seek_all.setOnSeekBarChangeListener(this); |
// toast=Toast; |
toast=toast.makeText(this, "Value too Dangerous - Clipping! Activate 'Allow Full Speed' to Override" + mk.stats.debug_data_count,Toast.LENGTH_LONG ); |
} |
@Override |
protected void onDestroy() |
{ |
mk.close_connections(true); |
mk=null; |
super.onDestroy(); |
} |
Toast toast; |
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch) { |
// mProgressText.setText(progress + " " + |
// getString(R.string.seekbar_from_touch) + "=" + fromTouch); |
if (( progress>50)&&(!full_speed.isChecked())) |
{ |
seekBar.setProgress(50); |
progress=50; |
toast.show (); |
} |
else |
{ |
toast.cancel(); |
} |
if (seekBar==seek_all) |
{ |
seek_right.setProgress(progress); |
seek_left.setProgress(progress); |
seek_front.setProgress(progress); |
seek_back.setProgress(progress); |
} |
int[] params=new int[4]; |
params[0] = seek_right.getProgress(); |
params[1] = seek_left.getProgress(); |
params[2] = seek_front.getProgress(); |
params[3] = seek_back.getProgress(); |
params[3] = seek_right.getProgress(); |
params[2] = seek_left.getProgress(); |
params[0] = seek_front.getProgress(); |
params[1] = seek_back.getProgress(); |
mk.motor_test(params); |
} |
public void onStartTrackingTouch(SeekBar seekBar) { |
//mTrackingText.setText(getString(R.string.seekbar_tracking_on)); |
} |
public void onStopTrackingTouch(SeekBar seekBar) { |
// mTrackingText.setText(getString(R.string.seekbar_tracking_off)); |
} |
} |
/DUBwise/trunk/j2me/bin/128x128/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-128x128-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 249717 |
MIDlet-Jar-Size: 251573 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/128x128/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/128x128/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-128x128-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 222981 |
MIDlet-Jar-Size: 224837 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/128x128/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/128x128/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-128x128-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 235648 |
MIDlet-Jar-Size: 237504 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/128x128/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/128x128/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-128x128-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 197017 |
MIDlet-Jar-Size: 198846 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/128x128/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/128x128/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-128x128-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 425973 |
MIDlet-Jar-Size: 427829 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/128x128/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-128x128-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/176x220/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-176x220-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 291930 |
MIDlet-Jar-Size: 293786 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/176x220/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/176x220/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-176x220-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 265194 |
MIDlet-Jar-Size: 267050 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/176x220/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/176x220/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-176x220-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 277861 |
MIDlet-Jar-Size: 279717 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/176x220/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/176x220/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-176x220-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 239230 |
MIDlet-Jar-Size: 241059 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/176x220/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/176x220/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-176x220-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 468186 |
MIDlet-Jar-Size: 470042 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/176x220/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-176x220-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/200x300/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-200x300-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 321073 |
MIDlet-Jar-Size: 322928 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/200x300/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/200x300/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-200x300-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 294337 |
MIDlet-Jar-Size: 296192 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/200x300/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/200x300/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-200x300-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 307004 |
MIDlet-Jar-Size: 308859 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/200x300/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/200x300/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-200x300-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 268379 |
MIDlet-Jar-Size: 270201 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/200x300/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/200x300/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-200x300-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 497329 |
MIDlet-Jar-Size: 499184 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/200x300/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-200x300-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/240x320/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-240x320-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 291751 |
MIDlet-Jar-Size: 293606 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/240x320/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/240x320/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-240x320-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 265015 |
MIDlet-Jar-Size: 266870 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/240x320/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/240x320/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-240x320-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 277682 |
MIDlet-Jar-Size: 279537 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/240x320/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/240x320/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-240x320-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 239057 |
MIDlet-Jar-Size: 240879 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/240x320/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/240x320/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-240x320-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 468007 |
MIDlet-Jar-Size: 469862 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/240x320/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-240x320-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/340x400/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-340x400-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 390300 |
MIDlet-Jar-Size: 392155 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/340x400/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/340x400/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-340x400-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 363564 |
MIDlet-Jar-Size: 365419 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/340x400/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/340x400/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-340x400-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 376231 |
MIDlet-Jar-Size: 378086 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/340x400/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/340x400/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-340x400-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 337606 |
MIDlet-Jar-Size: 339428 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/340x400/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/340x400/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-340x400-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 566556 |
MIDlet-Jar-Size: 568411 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/340x400/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-340x400-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/480x640/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-480x640-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 535081 |
MIDlet-Jar-Size: 536936 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/480x640/cldc11/de_64kbit_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-de_64kbit_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/480x640/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-480x640-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 508345 |
MIDlet-Jar-Size: 510200 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/480x640/cldc11/de_tts/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-de_tts-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/480x640/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-480x640-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 521012 |
MIDlet-Jar-Size: 522867 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/480x640/cldc11/en_speedy/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-en_speedy-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/480x640/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-480x640-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 482387 |
MIDlet-Jar-Size: 484209 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/480x640/cldc11/no_voice/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-no_voice-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/bin/480x640/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jad |
---|
1,5 → 1,5 |
MIDlet-Jar-URL: DUBwise-480x640-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
MIDlet-Jar-Size: 711337 |
MIDlet-Jar-Size: 713192 |
MIDlet-Name: DUBwise |
MIDlet-Vendor: LiGi |
MIDlet-Version: 0.51 |
/DUBwise/trunk/j2me/bin/480x640/cldc11/wav/bluetooth_on/fileapi_on/devicecontrol_on/DUBwise-480x640-cldc11-wav-all_firmwares-bluetooth_on-fileapi_on-devicecontrol_on.jar |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/DUBwise/trunk/j2me/build.rb |
---|
9,14 → 9,19 |
resdir="res/" |
puts `mv build.props build.props.bak` |
puts `ant clean` |
#puts `rm -rf bin` |
puts `mkdir bin` |
if ARGV.length==2 |
bindir=ARGV[1] |
else |
bindir="bin" |
end |
ARGV<<"" if ARGV==[] |
case ARGV[0] |
when "p910" |
screensizes=["200x300"] |
37,6 → 42,15 |
#firmware_modes=["all_firmwares"] |
firmware_modes=["no_firmwares"] |
when "bltest" |
screensizes=["240x320"] |
voice_modes=["en_speedy"] |
bluetooth_modes=["on"] |
devicecontrol_modes=["on"] |
fileapi_modes=["on"] |
cldc11_modes=["on"] |
firmware_modes=["all_firmwares"] |
when "test2" |
screensizes=["176x220"] |
voice_modes=["en_speedy"] |
91,6 → 105,10 |
end |
puts `mv build.props build.props.bak` |
puts `ant clean` |
#puts `rm -rf #{bindir}` |
puts `mkdir #{bindir}` |
propertys={} |
135,15 → 153,15 |
`ant build`.each_line { |l| puts l } |
`mkdir -p bin/#{screensize}/#{cldc11=="on"?"cldc11":"cldc10"}/#{voice_mode}/bluetooth_#{bluetooth}/fileapi_#{fileapi}/devicecontrol_#{devicecontrol}` |
`mkdir -p #{bindir}/#{screensize}/#{cldc11=="on"?"cldc11":"cldc10"}/#{voice_mode}/bluetooth_#{bluetooth}/fileapi_#{fileapi}/devicecontrol_#{devicecontrol}` |
# `mv build/bin/#{propertys["basename"]}* bin/#{screensize}/#{cldc11=="on"?"cldc11":"cldc10"}/#{voice_mode}/bluetooth_#{bluetooth}/fileapi_#{fileapi}/devicecontrol_#{devicecontrol}` |
# `mv build/bin/#{propertys["basename"]}* #{bindir}/#{screensize}/#{cldc11=="on"?"cldc11":"cldc10"}/#{voice_mode}/bluetooth_#{bluetooth}/fileapi_#{fileapi}/devicecontrol_#{devicecontrol}` |
`mkdir -p bin/#{screensize}/#{cldc11=="on"?"cldc11":"cldc10"}/#{voice_mode}/bluetooth_#{bluetooth}/fileapi_#{fileapi}/devicecontrol_#{devicecontrol}` |
`mkdir -p #{bindir}/#{screensize}/#{cldc11=="on"?"cldc11":"cldc10"}/#{voice_mode}/bluetooth_#{bluetooth}/fileapi_#{fileapi}/devicecontrol_#{devicecontrol}` |
`mv build/bin/#{propertys["basename"]}* bin/#{screensize}/#{cldc11=="on"?"cldc11":"cldc10"}/#{voice_mode}/bluetooth_#{bluetooth}/fileapi_#{fileapi}/devicecontrol_#{devicecontrol}` |
`mv build/bin/#{propertys["basename"]}* #{bindir}/#{screensize}/#{cldc11=="on"?"cldc11":"cldc10"}/#{voice_mode}/bluetooth_#{bluetooth}/fileapi_#{fileapi}/devicecontrol_#{devicecontrol}` |
} |
/DUBwise/trunk/j2me/src/DUBwiseCanvas.java |
---|
9,7 → 9,6 |
import javax.microedition.lcdui.*; |
import javax.microedition.media.*; |
import javax.microedition.media.control.*; |
237,7 → 236,7 |
} |
if ((settings.expert_mode)&& ( mk.ufo_prober.is_navi()||mk.ufo_prober.is_mk()||mk.ufo_prober.is_mk3mag()||mk.ufo_prober.is_incompatible() )) |
//if ((settings.expert_mode)&& ( mk.ufo_prober.is_navi()||mk.ufo_prober.is_mk()||mk.ufo_prober.is_mk3mag()||mk.ufo_prober.is_incompatible() )) |
{ |
tmp_actions[setup_pos]=ACTIONID_FLASH; |
tmp_items[setup_pos++] ="Flash Firmware"; |
266,6 → 265,7 |
tmp_actions_fin[tmp_p]=tmp_actions[tmp_p]; |
tmp_items_fin[tmp_p] =tmp_items[tmp_p]; |
} |
act_menu_select=0; |
setup_menu(tmp_items_fin,tmp_actions_fin); |
} |
518,7 → 518,7 |
} |
break; |
case STATEID_KEYCONTROL: |
mk.send_keys(keycontrol_bitfield); |
//mk.send_keys(keycontrol_bitfield); |
break; |
case STATEID_NC_ERRORS: |
771,9 → 771,10 |
} |
int symbol_left=0; |
int symbol_spacer=5; |
g.setClip(symbol_left,0,(symbols_img.getWidth()/10),symbols_img.getHeight());; |
if ((mk.ufo_prober.is_navi()||mk.ufo_prober.is_mk())) |
if (mk.connected) |
{ |
if (((mk.stats.bytes_in>>3)&1)==1) |
782,8 → 783,22 |
g.drawImage(symbols_img,(-3)*(symbols_img.getWidth()/10),0, g.TOP | g.LEFT); |
int symbol_spacer=5; |
symbol_left+=symbol_spacer+(symbols_img.getWidth()/10); |
} |
else |
g.drawImage(symbols_img,(-1)*(symbols_img.getWidth()/10),0, g.TOP | g.LEFT); |
if ((mk.ufo_prober.is_navi()||mk.ufo_prober.is_mk())) |
{ |
g.setClip(symbol_left,0,(symbols_img.getWidth()/10),symbols_img.getHeight());; |
g.drawImage(symbols_img,symbol_left+(-4)*(symbols_img.getWidth()/10),0, g.TOP | g.LEFT); |
823,8 → 838,6 |
} |
else |
g.drawImage(symbols_img,(-1)*(symbols_img.getWidth()/10),0, g.TOP | g.LEFT); |
// if (mk.connected) |
961,11 → 974,12 |
break; |
case STATEID_FLASHING: |
g.setFont(f2); |
int msg_pos=0; |
while (mk.flash_msgs[msg_pos]!=null) |
{ |
g.drawString(mk.flash_msgs[msg_pos] ,0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer; |
y_off+=spacer1; |
msg_pos++; |
} |
break; |
993,25 → 1007,30 |
case STATEID_KEYCONTROL: |
y_off+=spacer; |
g.drawString("UP&DOWN => nick",0,y_off,Graphics.TOP | Graphics.LEFT); |
g.drawString("UP&DOWN => nick " + mk.extern_control[EXTERN_CONTROL_NICK],0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer; |
g.drawString("LEFT&RIGHT => roll",0,y_off,Graphics.TOP | Graphics.LEFT); |
g.drawString("LEFT&RIGHT => roll " + mk.extern_control[EXTERN_CONTROL_ROLL],0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer; |
g.drawString("1&4 => altitude",0,y_off,Graphics.TOP | Graphics.LEFT); |
g.drawString("1&4 => altitude " + mk.extern_control[EXTERN_CONTROL_HIGHT],0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer; |
g.drawString("2&3 => gier",0,y_off,Graphics.TOP | Graphics.LEFT); |
g.drawString("2&3 => gier " + mk.extern_control[EXTERN_CONTROL_GIER],0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer; |
g.drawString("6&9 => gas " + mk.extern_control[EXTERN_CONTROL_GAS],0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer; |
g.drawString("Press # and * at once",0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer; |
g.drawString("to quit KeyControl",0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer; |
g.drawString("bf1:"+ keycontrol_bitfield[0] ,0,y_off,Graphics.TOP | Graphics.LEFT); |
g.drawString("bf2:"+ keycontrol_bitfield[1] ,canvas_width/2,y_off,Graphics.TOP | Graphics.LEFT); |
g.drawString("sent:" + mk.stats.external_control_request_count +"confirm:" + mk.stats.external_control_confirm_frame_count,0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer; |
// g.drawString("bf1:"+ keycontrol_bitfield[0] ,0,y_off,Graphics.TOP | Graphics.LEFT); |
//g.drawString("bf2:"+ keycontrol_bitfield[1] ,canvas_width/2,y_off,Graphics.TOP | Graphics.LEFT); |
break; |
case STATEID_MOTORTEST: |
1123,19 → 1142,24 |
g.drawString( " debug:"+mk.stats.debug_data_count+ " LCD:" + mk.stats.lcd_data_count + " vers:" + mk.stats.version_data_count,0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer1; |
g.drawString( " other:"+mk.stats.other_data_count+" params:"+mk.stats.params_data_count + " GPS:"+mk.stats.navi_data_count ,0,y_off,Graphics.TOP | Graphics.LEFT); |
g.drawString( " rc:"+mk.stats.stick_data_count+" params:"+mk.stats.params_data_count + " GPS:"+mk.stats.navi_data_count ,0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer1; |
g.drawString( " debug_names:" + mk.stats.debug_names_count + " angles:" + mk.stats.angle_data_count ,0,y_off,Graphics.TOP | Graphics.LEFT); |
g.drawString( " other:"+mk.stats.other_data_count,0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer1+3; |
g.drawString( "<<out:"+mk.stats.bytes_out + " bytes =>" + mk.stats.bytes_out/mk.conn_time_in_s() + "bytes/s", 0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer1; |
g.drawString( " LCD:" + mk.stats.lcd_data_request_count + " vers:" + mk.stats.version_data_request_count,0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer1; |
g.drawString( " params:"+mk.stats.params_data_request_count ,0,y_off,Graphics.TOP | Graphics.LEFT); |
g.drawString( " params:"+mk.stats.params_data_request_count +" rc:" + mk.stats.stick_data_request_count ,0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer1; |
g.drawString( " resend:"+mk.stats.resend_count ,0,y_off,Graphics.TOP | Graphics.LEFT); |
y_off+=spacer1; |
paint_menu(g); |
break; |
1341,7 → 1365,7 |
// int intro_str_pos=0; |
// int intro_str_delay=3; |
boolean init_bootloader=false; |
// boolean init_bootloader=false; |
public void chg_state(byte next_state) |
{ |
1360,7 → 1384,8 |
break; |
case STATEID_FLASHING: |
mk.bootloader_intension_flash=true; |
init_bootloader=true; |
mk.bl_retrys=0; |
mk.init_bootloader=true; |
break; |
//#if fileapi=="on" |
1501,6 → 1526,7 |
break; |
case STATEID_KEYCONTROL: |
mk.user_intent= USER_INTENT_EXTERNAL_CONTROL; |
keycontrol_exit=0; |
break; |
1619,47 → 1645,69 |
if (keyCode==KEY_STAR) |
keycontrol_exit &= 255^2; |
else |
if ((keyCode >= this.KEY_NUM0) && (keyCode < this.KEY_NUM8)) |
keycontrol_bitfield[0]&=255^( 1<<(keyCode-this.KEY_NUM0)); |
else |
if ((keyCode >= this.KEY_NUM8) && (keyCode <= this.KEY_NUM9)) |
keycontrol_bitfield[1]&=255^( 1<<(keyCode-this.KEY_NUM8)); |
else |
switch (getGameAction (keyCode)) |
mod_external_control_by_keycode(keyCode,(byte)0); |
/* |
mk.send_keys(keycontrol_bitfield); |
*/ |
break; |
} |
} |
public void mod_external_control_by_keycode(int keyCode,byte mul) |
{ |
if (keyCode==this.KEY_NUM2) |
mk.extern_control[EXTERN_CONTROL_GIER]=(byte)(-mul*settings.default_extern_control[EXTERN_CONTROL_GIER]); |
else if (keyCode==this.KEY_NUM3) |
mk.extern_control[EXTERN_CONTROL_GIER]=(byte)(mul*settings.default_extern_control[EXTERN_CONTROL_GIER]); |
else if (keyCode==this.KEY_NUM1) |
mk.extern_control[EXTERN_CONTROL_HIGHT]+=mul; |
else if (keyCode==this.KEY_NUM4) |
mk.extern_control[EXTERN_CONTROL_HIGHT]-=mul; |
else if (keyCode==this.KEY_NUM6) |
{ if ( mk.extern_control[EXTERN_CONTROL_GAS]<255) mk.extern_control[EXTERN_CONTROL_GAS]+=mul; } |
else if (keyCode==this.KEY_NUM9) |
{ if ( mk.extern_control[EXTERN_CONTROL_GAS]>0) mk.extern_control[EXTERN_CONTROL_GAS]-=mul; } |
else switch (getGameAction (keyCode)) |
{ |
case UP: |
keycontrol_bitfield[1]&=255^4; |
mk.extern_control[EXTERN_CONTROL_NICK]=(byte)(mul*settings.default_extern_control[EXTERN_CONTROL_NICK]); |
break; |
case DOWN: |
keycontrol_bitfield[1]&=255^8; |
mk.extern_control[EXTERN_CONTROL_NICK]=(byte)(-mul*settings.default_extern_control[EXTERN_CONTROL_NICK]); |
break; |
case LEFT: |
keycontrol_bitfield[1]&=255^16; |
mk.extern_control[EXTERN_CONTROL_ROLL]=(byte)(mul*settings.default_extern_control[EXTERN_CONTROL_ROLL]); |
break; |
case RIGHT: |
keycontrol_bitfield[1]&=255^32; |
mk.extern_control[EXTERN_CONTROL_ROLL]=(byte)(-mul*settings.default_extern_control[EXTERN_CONTROL_ROLL]); |
break; |
case FIRE: |
keycontrol_bitfield[1]&=255^64; |
break; |
} |
mk.send_keys(keycontrol_bitfield); |
break; |
} |
} |
// to check if 2 keys are pressed |
byte keycontrol_exit=0; |
public final static int[] keycontrol_bitfield={0,0}; |
// public final static int[] keycontrol_bitfield={0,0}; |
public void pointerPressed (int pointer_x, int pointer_y) |
1706,14 → 1754,6 |
debug.process_key(keyCode); |
if ((keyCode==KEY_NUM9)) |
{ chg_state(STATEID_STRINGINPUT); } |
if (((keyCode==KEY_STAR) || (keyCode==113) ))//&&(state!= STATEID_STRINGINPUT)) |
{ |
if (state==STATEID_EDIT_PARAMS) |
1927,6 → 1967,14 |
if (keyCode==KEY_STAR) |
keycontrol_exit |= 2; |
else |
mod_external_control_by_keycode(keyCode,(byte)1); |
if (keycontrol_exit==3) |
chg_state(STATEID_MAINMENU); |
/* |
if ((keyCode >= this.KEY_NUM0) && (keyCode < this.KEY_NUM8)) |
keycontrol_bitfield[0]|=1<<(keyCode-this.KEY_NUM0); |
else |
1958,10 → 2006,9 |
break; |
} |
if (keycontrol_exit==3) |
chg_state(STATEID_MAINMENU); |
else |
mk.send_keys(keycontrol_bitfield); |
*/ |
break; |
2115,7 → 2162,8 |
case ACTIONID_RESET_PARAMS: |
state=STATEID_FLASHING; |
mk.bootloader_intension_flash=false; |
init_bootloader=true; |
mk.bl_retrys=0; |
mk.init_bootloader=true; |
break; |
case ACTIONID_FLASH: |
/DUBwise/trunk/j2me/src/DUBwiseSettings.java |
---|
36,6 → 36,7 |
public byte speed_format=SPEED_FORMAT_KMH; |
public byte[] default_extern_control=default_extern_keycontrol ; |
//#if devicecontrol=="on" |
public boolean keep_lighton=false; |
/DUBwise/trunk/j2me |
---|
Property changes: |
Modified: svn:ignore |
tmp |
build |
+bin_tmp |
*.tmp |
/DUBwise/trunk/shared/src/DUBwiseDefinitions.java |
---|
10,6 → 10,7 |
public final static byte USER_INTENT_GRAPH=3; |
public final static byte USER_INTENT_RCDATA=4; |
public final static byte USER_INTENT_LCD=5; |
public final static byte USER_INTENT_EXTERNAL_CONTROL =6; |
public final static byte GPS_FORMAT_DECIMAL=0; |
19,4 → 20,33 |
public final static byte SPEED_FORMAT_KMH=0; // km/h |
public final static byte SPEED_FORMAT_MPH=1; // miles/h |
public final static byte SPEED_FORMAT_CMS=2; // cm/s |
/* from uart.h |
unsigned char Digital[2]; |
unsigned char RemoteTasten; |
signed char Nick; |
signed char Roll; |
signed char Gier; |
unsigned char Gas; |
signed char Hight; |
unsigned char free; |
unsigned char Frame; |
unsigned char Config; |
*/ |
public final static byte EXTERN_CONTROL_NICK =3; |
public final static byte EXTERN_CONTROL_ROLL =4; |
public final static byte EXTERN_CONTROL_GIER =5; |
public final static byte EXTERN_CONTROL_GAS =6; |
public final static byte EXTERN_CONTROL_HIGHT =7; |
public final static byte EXTERN_CONTROL_FRAME =9; |
public final static byte EXTERN_CONTROL_CONFIG =10; |
public final static byte EXTERN_CONTROL_LENGTH =11; |
public final static byte EXTERN_CONTROL_DEFAULT =42; |
public final static byte[] default_extern_keycontrol = { (byte)0, (byte)0, (byte)0, (byte)EXTERN_CONTROL_DEFAULT, (byte)EXTERN_CONTROL_DEFAULT, (byte)EXTERN_CONTROL_DEFAULT, (byte)255 , (byte)0, (byte)0, (byte)1, (byte)1 }; |
} |
/DUBwise/trunk/shared/src/MKCommunicator.java |
---|
27,11 → 27,13 |
public class MKCommunicator |
implements Runnable |
implements Runnable,DUBwiseDefinitions |
{ |
public byte bl_retrys=0; |
public boolean init_bootloader=false; |
public byte lib_version_major=0; |
public byte lib_version_minor=1; |
public byte lib_version_minor=3; |
public String lib_version_str() |
{ |
97,7 → 99,8 |
} |
public int CRC16(int ch, int crc) |
{ return crc16_table[((crc >> 8) ^ (ch)) & 0xFF] ^ (crc << 8); |
{ |
return crc16_table[((crc >> 8) ^ (ch)) & 0xFF] ^ (crc << 8); |
} |
108,15 → 111,17 |
else |
return 0; |
} |
public final static int BOOTLOADER_STAGE_NONE=0; |
public final static int BOOTLOADER_STAGE_GOT_MKBL=1; |
public final static byte BOOTLOADER_STAGE_NONE=0; |
public final static byte BOOTLOADER_STAGE_GOT_MKBL=1; |
int bootloader_stage= BOOTLOADER_STAGE_NONE; |
byte bootloader_stage= BOOTLOADER_STAGE_NONE; |
public MKLCD LCD; |
public MKVersion version; |
public MKDebugData debug_data; |
public int[] extern_control; |
public MKGPSPosition gps_position; |
public MKStickData stick_data; |
178,6 → 183,10 |
debug_data=new MKDebugData(); |
stick_data=new MKStickData(); |
params=new MKParamsParser(); |
extern_control=new int[EXTERN_CONTROL_LENGTH]; |
extern_control[EXTERN_CONTROL_CONFIG]=1; |
extern_control[EXTERN_CONTROL_FRAME]=1; |
LCD= new MKLCD(this); |
watchdog=new MKWatchDog(this); |
gps_position=new MKGPSPosition(); |
355,11 → 364,19 |
send_command(FC_SLAVE_ADDR,'t',params); |
} |
public void send_keys(int[] params) |
public void send_extern_control() |
{ |
send_command(FC_SLAVE_ADDR,'k',params); |
stats.external_control_request_count++; |
send_command(FC_SLAVE_ADDR,'b',extern_control); |
} |
/* public void send_keys(int[] params) |
{ |
send_command(FC_SLAVE_ADDR,'k',params); |
}*/ |
// get params |
public void get_params(int id) |
{ |
457,6 → 474,8 |
flash_msgs[msg_pos]="attempt "+attempt; |
attempt++; |
send_command_nocheck((byte)FC_SLAVE_ADDR,'R',new int[0]); |
try{ |
writer.write( 27); |
writer.flush(); |
464,7 → 483,8 |
writer.write( 0xAA); |
writer.flush(); |
} |
catch (Exception e) { } |
sleep((attempt%2==0)?80:800); //800 |
} |
msg_pos++; |
563,7 → 583,6 |
// 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; |
send_command_nocheck((byte)modul,cmd,params); |
612,6 → 631,10 |
debug_data.set_names_by_mk_data(Decode64(data,3,len-3)); |
break; |
case 'B': // external_control confirm frames |
stats.external_control_confirm_frame_count++; |
break; |
case 'L': // LCD Data |
stats.lcd_data_count++; |
LCD.handle_lcd_data(Decode64(data,3,len-3)); |
730,7 → 753,7 |
// Thread to recieve data from Connection |
public void run() |
{ |
boolean sigfail=false; |
if (bootloader_stage==BOOTLOADER_STAGE_GOT_MKBL) |
{ |
try { |
740,6 → 763,10 |
writer.flush(); |
int avr_sig=reader.read(); |
while (avr_sig==63) |
avr_sig=reader.read(); |
flash_msgs[msg_pos++]="got avr sig " + avr_sig; |
747,7 → 774,10 |
throw new Exception("val after avrsig isnt 0"); |
if ((avr_sig!=0x74)&&(avr_sig!=224)&&(avr_sig!=120)) |
{ |
sigfail=true; |
throw new Exception("avr sig" + avr_sig + " unknown"); |
} |
writer.write('T'); |
// writer.flush(); |
784,27 → 814,32 |
byte[] flash_buff =new byte[send_buff_size]; ///!! |
String firmware_filename=(avr_sig==224)?"/navi.bin":((avr_sig==120)?"/mk3.bin":"/fc.bin"); |
flash_msgs[msg_pos++]="Opening firmware " + firmware_filename + ".."; |
flash_msgs[msg_pos++]="Opening firmware .."; |
InputStream in; |
try { |
in=this.getClass().getResourceAsStream((avr_sig==224)?"/navi.bin":((avr_sig==120)?"mk3.bin":"/fc.bin")); |
in=this.getClass().getResourceAsStream(firmware_filename); |
} |
catch (Exception e) { throw new Exception(" cant open firmware"); } |
catch (Exception e) { throw new Exception(" .. cant open firmware"); } |
int firmware_size=-1; |
try { |
firmware_size= ((int)in.read()<<24) |((int)in.read()<<16) | ((int)in.read()<<8) | ((int)in.read()&0xff) ; |
} |
catch (Exception e) { throw new Exception(" .. cant read size"); } |
int firmware_size= ((int)in.read()<<24) |((int)in.read()<<16) | ((int)in.read()<<8) | ((int)in.read()&0xff) ; |
flash_msgs[msg_pos++]=".. open with " + firmware_size + "bytes"; |
int blocks2write=((firmware_size/send_buff_size)); |
flash_msgs[msg_pos++]=".. open("+blocks2write+" blocks," + firmware_size + "bytes)"; |
// if (true) throw new Exception("before erasing"); |
// if (true) throw new Exception("before erasing" ); |
flash_msgs[msg_pos++]="Erasing Flash .."; |
828,7 → 863,7 |
flash_msgs[msg_pos++]="addr set"; |
int blocks2write=((firmware_size/send_buff_size)); |
// int blocks2write=((firmware_size/send_buff_size)); |
if ((firmware_size%send_buff_size)>0) |
blocks2write++; |
993,9 → 1028,11 |
flash_msgs[msg_pos++]="cant exit bootloader" ; |
} |
flash_msgs[msg_pos++]="Exit BL done" ; |
if (sigfail&&(bl_retrys<3)) |
{ |
bl_retrys++; |
init_bootloader=true; |
} |
close_connections(false); |
} |
/DUBwise/trunk/shared/src/MKStatistics.java |
---|
9,8 → 9,6 |
package org.ligi.ufo; |
public class MKStatistics |
{ |
19,6 → 17,8 |
public int bytes_out=0; |
public int resend_count=0; |
public int debug_data_count=0; |
public int debug_names_count=0; |
public int angle_data_count=0; |
28,6 → 28,7 |
public int params_data_count=0; |
public int navi_data_count=0; |
public int stick_data_count=0; |
public int external_control_confirm_frame_count=0; |
public int debug_data_request_count=0; |
38,7 → 39,9 |
// public int navi_data_count=0; |
public int stick_data_request_count=0; |
public int motortest_request_count=0; |
public int external_control_request_count=0; |
public void reset() |
{ |
/DUBwise/trunk/shared/src/MKWatchDog.java |
---|
34,10 → 34,25 |
int last_count=0; |
public boolean resend_check(int ref_count) |
{ |
if (( last_count!=ref_count)||(resend_timeout<0)) |
{ |
if (resend_timeout<0) mk.stats.resend_count++; |
last_count=ref_count; |
resend_timeout=20; |
return true; |
} |
else |
resend_timeout--; |
return false; |
} |
//#ifdef android |
// public final static int BASE_SLEEP=50; |
//#else |
public final static int BASE_SLEEP=40; |
public final static int BASE_SLEEP=10; |
//#endif |
public void run() |
45,22 → 60,22 |
mk.log("starting Watchdog"); |
// get all params |
int act_debug_name=0; |
int sleeper=BASE_SLEEP; |
// int sleeper=BASE_SLEEP; |
while(true) |
{ |
try { |
Thread.sleep(sleeper); |
sleeper=BASE_SLEEP; |
Thread.sleep(BASE_SLEEP); |
// sleeper=BASE_SLEEP; |
if (mk.connected&&(!mk.force_disconnect)) |
{ |
mk.log("watchdog pre main loop"); |
/* if (mk.root.canvas.init_bootloader) |
if (mk.init_bootloader) |
{ |
mk.jump_bootloader(); |
mk.root.canvas.init_bootloader=false; |
mk.init_bootloader=false; |
} |
else */if ( mk.version.major==-1 ) |
else if ( mk.version.major==-1 ) |
mk.get_version(); |
else if (mk.ufo_prober.is_navi()&&(mk.error_str==null)) |
mk.get_error_str(); |
68,7 → 83,8 |
else if (mk.ufo_prober.is_mk()&&(mk.params.last_parsed_paramset==-1)) |
{ |
mk.get_params(0xFF-1); |
sleeper+=150; |
Thread.sleep(150); |
act_paramset=0; // warning - if dropped problem |
} |
else switch (mk.user_intent) |
126,26 → 142,21 |
break; |
case USER_INTENT_RCDATA: |
if ( resend_check(mk.stats.stick_data_count) ) |
mk.trigger_rcdata(); |
sleeper+=250; |
break; |
case USER_INTENT_EXTERNAL_CONTROL: |
if (resend_check(mk.stats.external_control_confirm_frame_count)) |
mk.send_extern_control(); |
break; |
case USER_INTENT_LCD: |
if (resend_timeout==0) |
{ |
if (resend_check(mk.stats.lcd_data_count)) |
mk.LCD.trigger_LCD(); |
resend_timeout=50; |
} |
if ( last_count!=mk.stats.lcd_data_count) |
{ |
mk.LCD.trigger_LCD(); |
resend_timeout=50; |
} |
else |
resend_timeout--; |
//sleeper +=250; |
break; |
default: |