Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 257 → Rev 258

/DUBwise/trunk/j2me/src/DUBwiseCanvas.java
221,6 → 221,7
tmp_menu_add(l(STRINGID_CONN),ACTIONID_CONN_DETAILS);
 
tmp_menu_add(l(STRINGID_SELECT_FIRMWARE),ACTIONID_SELECT_FIRMWARE);
tmp_menu_add("UPDATE_DUBWISE",ACTIONID_UPDATE_DUBWISE);
 
 
if (settings.expert_mode)
894,10 → 895,10
 
try {
if (settings.keep_lighton) com.nokia.mid.ui.DeviceControl.setLights(0,100);
//#endif
 
}
catch (Exception e) { }
//#endif
sleeptime=1000/ 15 - (int) (System.currentTimeMillis()- loopStartTime);
 
1390,7 → 1391,7
 
for(int tmp_y=0;tmp_y<10;tmp_y++)
{
g.drawString(""+tmp_y+"(" + mk.params.stick_names[tmp_y] + ")=>"+mk.stick_data.stick[tmp_y],0,y_off,Graphics.TOP | Graphics.LEFT);
g.drawString(""+tmp_y+"(" + l(mk.params.stick_stringids[tmp_y]) + ")=>"+mk.stick_data.stick[tmp_y],0,y_off,Graphics.TOP | Graphics.LEFT);
y_off+=spacer;
}
break;
2136,6 → 2137,14
{
switch(actionid)
{
case ACTIONID_UPDATE_DUBWISE:
try
{
root.platformRequest("http://mikrocontroller.cco-ev.de/mikrosvn/Projects/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");
}
catch(Exception e) { }
break;
 
case ACTIONID_PARAM_LOAD_MOBILE:
try
{
/DUBwise/trunk/j2me/src/DUBwiseSettings.java
226,23 → 226,46
 
 
public int[] _tab_stringids={STRINGID_USERINTERFACE,STRINGID_GPS,STRINGID_KEYCONTROL,STRINGID_SPECIALKEYS,STRINGID_GRAPH,STRINGID_VOICE,STRINGID_OTHER};
public String[][] _field_names={ { "Language","Skin","Fullscreen","Scroll Background"
//#if devicecontrol=="on"
,"Permanent Light"
//#endif
} , {"GPS Format","Speed Format"},{"Nick","Roll","Gier","Gas Increase","Height Increase"},{"Back to Main-Menu","Fullscreen","Clear"},{"Legend","Scale-Grid"},{"Volts Output","Delay in Seconds","Volume"},{"Sound","Vibra","Remote Cam Stick","Always Reload Params","Expert-Mode"} };
 
public String[][] _choice_strings={ { "Dark","Light" } , {"km/h","mp/h","cm/s"},{"decimal","min sec"},{"English","Deutsch"} } ;
 
public int[][] _field_stringids ={
{
STRINGID_LANGUAGE,
STRINGID_SKIN,
STRINGID_FULLSCREEN,
STRINGID_SCROLLBG
//#if devicecontrol=="on"
,STRINGID_PERMALIGHT
//#endif
},
{ STRINGID_GPSFORMAT, STRINGID_SPEEDFORMAT},
{ STRINGID_NICK ,STRINGID_ROLL,STRINGID_GIER,STRINGID_GASINCREASE,STRINGID_HEIGHTINCREASE },
{STRINGID_BACKTOMAINMENU,STRINGID_FULLSCREEN,STRINGID_CLEAR },
{STRINGID_LEGEND,STRINGID_SCALEGRID},
{STRINGID_VOLTS,STRINGID_DELAYINS,STRINGID_VOLUME},
{STRINGID_SOUND,STRINGID_VIBRA,STRINGID_REMOTECAMSTICK,STRINGID_ALWAYSRELOADPARAMS,STRINGID_EXPERTMODE}};
 
 
 
// public String[][] _choice_strings={ { "Dark","Light" } , {"km/h","mp/h","cm/s"},{"decimal","min sec"},{"English","Deutsch"} } ;
 
 
public int[][] _choice_stringids={ {STRINGID_LANG0,STRINGID_LANG1}, /* FIXME - make dynamic */{ STRINGID_DARK,STRINGID_LIGHT } , {STRINGID_KMH,STRINGID_MPH,STRINGID_CMS},{STRINGID_DECIMAL,STRINGID_MINSEC} } ;
 
 
 
 
 
public int[][] _field_positions={ {SETTINGS_POS_LANG,SETTINGS_POS_SKIN,8,9
//#if devicecontrol=="on"
,13
//#endif
} , {2,3} , {4,5,6,7,8} , {9,10,11},{SETTINGS_POS_BITFIELD1*8 +6,SETTINGS_POS_BITFIELD1*8 +7} ,{SETTINGS_POS_BITFIELD2*8+0,SETTINGS_POS_VOICEDELAY,SETTINGS_POS_VOICEVOLUME }, {10,11,12,SETTINGS_POS_BITFIELD2*8+1,12}};
public int[][] _field_types={ {PARAMTYPE_CHOICE+3,PARAMTYPE_CHOICE+0,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH
public int[][] _field_types={ {PARAMTYPE_CHOICE+0,PARAMTYPE_CHOICE+1,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH
//#if devicecontrol=="on"
,PARAMTYPE_BITSWITCH
//#endif
} , {PARAMTYPE_CHOICE+1,PARAMTYPE_CHOICE+2} , {PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE}, {PARAMTYPE_KEY,PARAMTYPE_KEY,PARAMTYPE_KEY} , {PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH}, {PARAMTYPE_BITSWITCH,PARAMTYPE_BYTE,PARAMTYPE_BYTE}, {PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_STICK,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH}};
} , {PARAMTYPE_CHOICE+2,PARAMTYPE_CHOICE+3} , {PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE,PARAMTYPE_BYTE}, {PARAMTYPE_KEY,PARAMTYPE_KEY,PARAMTYPE_KEY} , {PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH}, {PARAMTYPE_BITSWITCH,PARAMTYPE_BYTE,PARAMTYPE_BYTE}, {PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH,PARAMTYPE_STICK,PARAMTYPE_BITSWITCH,PARAMTYPE_BITSWITCH}};
DUBwiseCanvas canvas;
 
 
271,10 → 294,27
tab_stringids=_tab_stringids;
 
// tab_names=_tab_names;
field_names=_field_names;
 
field_positions=_field_positions;
field_types=_field_types;
choice_strings=_choice_strings;
 
choice_stringids=_choice_stringids;
 
field_stringids=_field_stringids;
//choice_strings=new String[_choice_strings.length+1][];
/*
// FIXME
choice_strings[0]=new String[2];
choice_strings[0][0]="English";
choice_strings[0][1]="Deutsch";
for ( int i=1; i<_choice_strings.length+1;i++)
{
choice_strings[i]=new String[_choice_strings[i-1].length+1];
for ( int ii=0; ii<_choice_strings[i-1].length;ii++)
choice_strings[i][ii]=canvas.l(_choice_strings[i-1][ii]);
}
*/
// choice_strings=_choice_strings;
try
{
RecordStore recStore = RecordStore.openRecordStore(RECORD_STORE_NAME , true );
/DUBwise/trunk/j2me/src/DUBwiseUIDefinitions.java
92,6 → 92,7
public final static byte ACTIONID_SELECT_PARAMS = 37;
public final static byte ACTIONID_RENAME_PARAMS = 38;
public final static byte ACTIONID_SELECT_FIRMWARE = 39;
public final static byte ACTIONID_UPDATE_DUBWISE = 40;
public final static byte ACTIONID_QUIT = 100;
 
/DUBwise/trunk/j2me/src/MKParamsEditor.java
70,7 → 70,7
{
 
try {
act_lcd_lines=edit_source.field_names[act_tab].length*2+2;
act_lcd_lines=edit_source.field_stringids[act_tab].length*2+2;
for ( int i=0;i<act_lcd_lines;i++)
lcd_lines[i]="";
79,14 → 79,14
// lcd_lines[0]=(act_tab==0?" ":"< ") + edit_source.tab_stringids[act_tab] + (act_tab==(edit_source.tab_stringids.length-1)?" ":" >");
for (int i=0;i<edit_source.field_names[act_tab].length;i++)
for (int i=0;i<edit_source.field_stringids[act_tab].length;i++)
{
lcd_lines[2*i]=edit_source.field_names[act_tab][i];
lcd_lines[2*i]=canvas.l(edit_source.field_stringids[act_tab][i]);
switch(edit_source.field_types[act_tab][i])
{
case PARAMTYPE_BITSWITCH:
lcd_lines[1+2*i]=" " + (((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]/8)&(1<<edit_source.field_positions[act_tab][i]%8))==0)?"off":"on" ) ;
lcd_lines[1+2*i]=" " + (((edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]/8)&(1<<edit_source.field_positions[act_tab][i]%8))==0)?canvas.l(STRINGID_OFF):canvas.l(STRINGID_ON) ) ;
break;
 
case PARAMTYPE_BYTE:
117,7 → 117,7
 
case PARAMTYPE_KEY:
if (edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])==-4242)
lcd_lines[1+2*i]="none";
lcd_lines[1+2*i]=canvas.l(STRINGID_NONE_ASSIGNED);
else
lcd_lines[1+2*i]=" "+edit_source.get_field_from_act(edit_source.field_positions[act_tab][i]);
break;
126,7 → 126,7
break;
default:
lcd_lines[1+2*i]=" "+edit_source.choice_strings[edit_source.field_types[act_tab][i]-PARAMTYPE_CHOICE][edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])];
lcd_lines[1+2*i]=" "+canvas.l(edit_source.choice_stringids[edit_source.field_types[act_tab][i]-PARAMTYPE_CHOICE][edit_source.get_field_from_act(edit_source.field_positions[act_tab][i])]);
}
}
291,7 → 291,7
break;
default:
edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_strings[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length);
edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_stringids[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length);
break;
}
break;
312,7 → 312,7
edit_source.field_from_act_add_min_max(edit_source.field_positions[act_tab][act_pos],-1,0,10);
break;
default:
edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_strings[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length);
edit_source.field_from_act_add_mod(edit_source.field_positions[act_tab][act_pos],1,edit_source.choice_stringids[edit_source.field_types[act_tab][act_pos]-PARAMTYPE_CHOICE].length);
break;
}