Subversion Repositories Projects

Rev

Rev 267 | Rev 382 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 267 Rev 269
Line 25... Line 25...
25
    public  final static byte[] param_menu_actions={ACTIONID_SELECT_PARAMS,ACTIONID_PARAM_COPY_MOBILE,ACTIONID_PARAM_LOAD_MOBILE,ACTIONID_RESET_PARAMS,ACTIONID_MAINMENU};
25
    public  final static byte[] param_menu_actions={ACTIONID_SELECT_PARAMS,ACTIONID_PARAM_COPY_MOBILE,ACTIONID_PARAM_LOAD_MOBILE,ACTIONID_RESET_PARAMS,ACTIONID_MAINMENU};
Line 26... Line 26...
26
 
26
 
27
    public  final static int[] handle_params_menu_items={STRINGID_EDIT_CONTENT,STRINGID_RENAME,STRINGID_SAVE_AS,STRINGID_SAVE,STRINGID_REREAD,STRINGID_BACK};
27
    public  final static int[] handle_params_menu_items={STRINGID_EDIT_CONTENT,STRINGID_RENAME,STRINGID_SAVE_AS,STRINGID_SAVE,STRINGID_REREAD,STRINGID_BACK};
Line -... Line 28...
-
 
28
    public  final static byte[] handle_params_menu_actions={ACTIONID_EDIT_PARAMS,ACTIONID_RENAME_PARAMS,ACTIONID_WRITE_PARAM_AS,ACTIONID_WRITE_PARAMS,ACTIONID_UNDO_PARAMS,ACTIONID_SELECT_PARAMS };
-
 
29
 
-
 
30
 
-
 
31
 
-
 
32
    public  final static int[] setting_options_menu_items={STRINGID_EDIT,STRINGID_LOADPLAIN,STRINGID_LOADFANCY,STRINGID_BACK};
28
    public  final static byte[] handle_params_menu_actions={ACTIONID_EDIT_PARAMS,ACTIONID_RENAME_PARAMS,ACTIONID_WRITE_PARAM_AS,ACTIONID_WRITE_PARAMS,ACTIONID_UNDO_PARAMS,ACTIONID_SELECT_PARAMS };
33
    public  final static byte[]setting_options_menu_actions={ACTIONID_SETTINGS,ACTIONID_SETTING_LOADPLAIN,ACTIONID_SETTING_LOADFANCY,ACTIONID_MAINMENU };
29
 
34
 
Line 30... Line 35...
30
    public final static int[] onlyback_menu_items={STRINGID_BACK };
35
    public final static int[] onlyback_menu_items={STRINGID_BACK };
Line 217... Line 222...
217
 
222
 
218
        if (mk.connected)
223
        if (mk.connected)
219
            {
224
            {
220
                tmp_menu_add(l(STRINGID_PACKET_TRAFFIC),ACTIONID_TRAFFIC);
225
                tmp_menu_add(l(STRINGID_PACKET_TRAFFIC),ACTIONID_TRAFFIC);
-
 
226
                tmp_menu_add(l(STRINGID_VIEW_DATA),ACTIONID_DATABUFF);
221
                tmp_menu_add(l(STRINGID_VIEW_DATA),ACTIONID_DATABUFF);
227
                tmp_menu_add(l(STRINGID_FORCERECONNECT),ACTIONID_RECONNECT);
222
            }
228
            }
223
//#if bluetooth=="on"
229
//#if bluetooth=="on"
224
        tmp_menu_add(l(STRINGID_CONNECT_BT),ACTIONID_SCAN_BT);
230
        tmp_menu_add(l(STRINGID_CONNECT_BT),ACTIONID_SCAN_BT);
225
//#endif
231
//#endif
Line 236... Line 242...
236
 
242
 
237
    public void setup_main_menu()
243
    public void setup_main_menu()
238
    {
244
    {
Line 239... Line 245...
239
        tmp_menu_init(20);
245
        tmp_menu_init(20);
240
       
246
       
Line 241... Line 247...
241
        tmp_menu_add(l(STRINGID_SETTINGS),ACTIONID_SETTINGS);
247
        tmp_menu_add(l(STRINGID_SETTINGS),ACTIONID_SETTING_OPTIONS);
242
        tmp_menu_add(l(STRINGID_CONN),ACTIONID_CONN_DETAILS);
248
        tmp_menu_add(l(STRINGID_CONN),ACTIONID_CONN_DETAILS);
243
 
249
 
Line 1773... Line 1779...
1773
 
1779
 
Line 1774... Line 1780...
1774
                case STATEID_SETTINGSMENU:
1780
                case STATEID_SETTINGSMENU:
1775
 
1781
 
-
 
1782
                    settings_editor.paint(g);
1776
                    settings_editor.paint(g);
1783
                    break;
-
 
1784
 
1777
                    break;
1785
                // falltru wanted
1778
                // falltru wanted
1786
                case STATEID_SETTING_OPTIONS:
1779
                case STATEID_MAINMENU: 
1787
                case STATEID_MAINMENU: 
1780
                case STATEID_SELECT_PARAMSET:
1788
                case STATEID_SELECT_PARAMSET:
Line 2051... Line 2059...
2051
 
2059
 
2052
            {
2060
            {
Line 2053... Line 2061...
2053
                //          case STATEID_COPY_PARAMS:
2061
                //          case STATEID_COPY_PARAMS:
-
 
2062
               
-
 
2063
                //break;
-
 
2064
            case STATEID_SETTING_OPTIONS:
Line 2054... Line 2065...
2054
               
2065
                setup_menu(setting_options_menu_items,setting_options_menu_actions);
Line 2055... Line 2066...
2055
                //break;
2066
                break;
2056
 
2067
 
2057
            case STATEID_GPSVIEW:
2068
            case STATEID_GPSVIEW:
2058
 
-
 
2059
                mk.user_intent=USER_INTENT_GPSOSD;
-
 
2060
                break;
-
 
2061
            case STATEID_SELECT_FIRMWARE:
2069
 
2062
               
2070
                mk.user_intent=USER_INTENT_GPSOSD;
2063
 
-
 
2064
 
2071
                break;
Line 2065... Line 2072...
2065
                fw_loader=new FirmwareLoader();
2072
            case STATEID_SELECT_FIRMWARE:
2066
                setup_menu(new String[0],new byte[0]);
2073
                fw_loader=new FirmwareLoader();
Line 2374... Line 2381...
2374
 
2381
 
2375
    public void process_action(byte actionid)
2382
    public void process_action(byte actionid)
2376
    {
2383
    {
2377
        switch(actionid)
2384
        switch(actionid)
-
 
2385
            {
-
 
2386
            case ACTIONID_SETTING_LOADFANCY:
-
 
2387
                settings.load_fancy_defaults();
-
 
2388
                break;
-
 
2389
 
-
 
2390
            case ACTIONID_SETTING_LOADPLAIN:
-
 
2391
                settings.load_plain_defaults();
-
 
2392
                break;
-
 
2393
 
-
 
2394
            case ACTIONID_RECONNECT:
-
 
2395
                mk.close_connections(false);
2378
            {
2396
                break;
2379
            case ACTIONID_UPDATE_DUBWISE:
2397
            case ACTIONID_UPDATE_DUBWISE:
2380
                try
2398
                try
2381
                    {
2399
                    {
2382
                        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");
2400
                        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");
Line 2532... Line 2550...
2532
                               
2550
                               
2533
            case ACTIONID_SETTINGS:
2551
            case ACTIONID_SETTINGS:
2534
                chg_state(STATEID_SETTINGSMENU);
2552
                chg_state(STATEID_SETTINGSMENU);
Line -... Line 2553...
-
 
2553
                break;
-
 
2554
 
-
 
2555
            case ACTIONID_SETTING_OPTIONS:
-
 
2556
                chg_state(STATEID_SETTING_OPTIONS);
2535
                break;
2557
                break;
2536
 
2558
 
2537
            case ACTIONID_RCDATA:
2559
            case ACTIONID_RCDATA:
Line 2538... Line 2560...
2538
                chg_state(STATEID_STICKVIEW);
2560
                chg_state(STATEID_STICKVIEW);
Line 2661... Line 2683...
2661
                case STATEID_HANDLE_PARAMS:
2683
                case STATEID_HANDLE_PARAMS:
2662
                case STATEID_FILEOPEN:
2684
                case STATEID_FILEOPEN:
2663
                case STATEID_TRAFFIC:
2685
                case STATEID_TRAFFIC:
2664
                case STATEID_SELECT_COMPORT:   
2686
                case STATEID_SELECT_COMPORT:   
2665
                case STATEID_MAINMENU:
2687
                case STATEID_MAINMENU:
-
 
2688
                case STATEID_SETTING_OPTIONS:
2666
                case STATEID_SELECT_PARAMSET:
2689
                case STATEID_SELECT_PARAMSET:
2667
                case STATEID_DEVICESELECT:
2690
                case STATEID_DEVICESELECT:
Line 2668... Line 2691...
2668
       
2691
       
Line 2992... Line 3015...
2992
                else
3015
                else
2993
                    menu_keypress(keyCode);
3016
                    menu_keypress(keyCode);
2994
                break;
3017
                break;
2995
                */
3018
                */
Line -... Line 3019...
-
 
3019
 
2996
 
3020
            case STATEID_SETTING_OPTIONS:
2997
            case STATEID_MAINMENU:
3021
            case STATEID_MAINMENU:
2998
            case STATEID_SELECT_PARAMSET:
3022
            case STATEID_SELECT_PARAMSET:
Line 2999... Line 3023...
2999
            case STATEID_SELECT_COMPORT:       
3023
            case STATEID_SELECT_COMPORT: