Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 484 → Rev 485

/branches/ligi_j2me/README
48,13 → 48,16
- draw Graphs with Nick integral / Roll integral / Nick acc / Roll acc
- test each motor ( like MotorTest in MK-Tool )
- Draw LCD of mk ( + interact with it Up/Down )
- get MK_version
- Fly the MikroKopter ( you nees GPS and a special MK-Version )
- View all DebugValues
- measure ConnectionTime / Motor=15Time / Motor>15Time ( UpTime )
- Read and Edit Settings/Parameters from MK
- initial Proxy Function ( send Data from MK via TCP/IP to socket )
- save MK MAC/Name - so that scanning is only needed once ( you have to Quit via the Menu-Item - not the systems Exit button or simply turning the Phone off)
- get MK_version
- reconnect after connection loss ( detection of disconnect could be faster )
 
 
*** Install:
- If u know how to handle JAR/JADs take the ones from the bin directory.
- If u dont visit http://www.getjar.com/products/12587/DUBwise ( SVN might be more recent)
/branches/ligi_j2me/bin/v0.42_pre2/DUBwise_240x320.jad
0,0 → 1,8
MIDlet-Jar-URL: DUBwise_240x320.jar
MIDlet-Jar-Size: 72782
MIDlet-Name: DUBwise
MIDlet-Vendor: LiGi
MIDlet-Version: 0.42
MIDlet-1: DUBwise, i.png, DUBwise
MIDletX-No-Command: true
MIDlet-Icon: i.png
/branches/ligi_j2me/bin/v0.42_pre2/DUBwise_240x320.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
/branches/ligi_j2me/res/240x320/bt.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/ligi_j2me/res/240x320/load.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/ligi_j2me/res/240x320/starfield.jpg
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
/branches/ligi_j2me/src/MKMiniCanvas.java
161,7 → 161,7
// load all needed images
lcd_img=Image.createImage("/lcd.png");
bt_img=Image.createImage("/bt.png");
bg_img=Image.createImage("/bg.jpg");
bg_img=Image.createImage("/starfield.jpg");
load_img=Image.createImage("/load.png");
}
catch (Exception e)
419,12 → 419,30
}
 
g.setColor(0x000000);
 
g.setColor(0x2dcf20);
switch(state)
{
case STATEID_KEYCONTROL:
g.drawString("bf1:"+ keycontrol_bitfield[0] ,0,10,Graphics.TOP | Graphics.LEFT);
g.drawString("bf2:"+ keycontrol_bitfield[1] ,0,30,Graphics.TOP | Graphics.LEFT);
 
 
y_off+=spacer;
g.drawString("UP&DOWN => nick",0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("LEFT&RIGHT => roll",0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
g.drawString("1&4 => altitude",0,y_off,Graphics.TOP | Graphics.LEFT);
 
y_off+=spacer;
g.drawString("2&3 => gier",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] ,this.getWidth()/2,y_off,Graphics.TOP | Graphics.LEFT);
break;
 
case STATEID_MOTORTEST:
446,7 → 464,7
case STATEID_SCANNING:
paint_lcd(g,true);
 
g.setClip(this.getWidth()/2-load_img.getWidth()/6,this.getHeight()/2-load_img.getHeight()/8, load_img.getWidth()/4,load_img.getHeight()/3);;
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;
606,6 → 624,10
// prepare next state
switch(next_state)
{
case STATEID_KEYCONTROL:
keycontrol_exit=0;
break;
 
case STATEID_SCANNING:
lcd_lines=new String[4];
lcd_lines[0]="Scanning for Devices";
664,6 → 686,12
break;
case STATEID_KEYCONTROL:
if (keyCode==KEY_POUND)
keycontrol_exit &= 255^1;
else
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
702,21 → 730,29
}
 
 
byte keycontrol_exit=0;
public final static int[] keycontrol_bitfield={0,0};
 
public void keyPressed(int keyCode)
{
 
if (keyCode==KEY_STAR)
{
if (state==STATEID_EDIT_PARAMS)
chg_state(STATEID_HANDLE_PARAMS);
{
chg_state(STATEID_HANDLE_PARAMS);
return;
}
else
chg_state(STATEID_MAINMENU);
return;
if (state!=STATEID_KEYCONTROL)
{
chg_state(STATEID_MAINMENU);
return;
}
 
}
if (keyCode==KEY_POUND)
if ((keyCode==KEY_POUND)&&(state!=STATEID_KEYCONTROL))
{
fullscreen=!fullscreen;
setFullScreenMode(fullscreen);
725,6 → 761,12
switch(state)
{
case STATEID_KEYCONTROL:
if (keyCode==KEY_POUND)
keycontrol_exit |= 1;
else
if (keyCode==KEY_STAR)
keycontrol_exit |= 2;
else
if ((keyCode >= this.KEY_NUM0) && (keyCode < this.KEY_NUM8))
keycontrol_bitfield[0]|=1<<(keyCode-this.KEY_NUM0);
else
754,8 → 796,12
case FIRE:
keycontrol_bitfield[1]|=64;
break;
 
}
mk.send_keys(keycontrol_bitfield);
if (keycontrol_exit==3)
chg_state(STATEID_MAINMENU);
else
mk.send_keys(keycontrol_bitfield);
break;