Subversion Repositories Projects

Rev

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

Rev 497 Rev 507
Line 65... Line 65...
65
const char menu_item1[] PROGMEM = "Full HUD";
65
const char menu_item1[] PROGMEM = "Full HUD";
66
const char menu_item2[] PROGMEM = "Art.Horizon in HUD";
66
const char menu_item2[] PROGMEM = "Art.Horizon in HUD";
67
const char menu_item3[] PROGMEM = "Big Vario bar";
67
const char menu_item3[] PROGMEM = "Big Vario bar";
68
const char menu_item4[] PROGMEM = "Statistics";
68
const char menu_item4[] PROGMEM = "Statistics";
69
const char menu_item5[] PROGMEM = "Warnings"; // TODO: do it!
69
const char menu_item5[] PROGMEM = "Warnings"; // TODO: do it!
70
const char menu_item6[] PROGMEM = "Reset uptime";
70
const char menu_item6[] PROGMEM = "Voltage by C-Strom";
71
const char menu_item7[] PROGMEM = "Request OSD-data";
71
const char menu_item7[] PROGMEM = "Reset uptime";
72
const char menu_item8[] PROGMEM = "Display Mode";
72
const char menu_item8[] PROGMEM = "Display Mode";
73
const char menu_item9[] PROGMEM = "Save config";
73
const char menu_item9[] PROGMEM = "Save config";
74
const char menu_item10[] PROGMEM = "EXIT";
74
const char menu_item10[] PROGMEM = "EXIT";
75
const char* menu[] = {menu_item0, menu_item1, menu_item2, menu_item3, menu_item4,
75
const char* menu[] = {menu_item0, menu_item1, menu_item2, menu_item3, menu_item4,
76
        menu_item5, menu_item6, menu_item7, menu_item8, menu_item9, menu_item10};
76
        menu_item5, menu_item6, menu_item7, menu_item8, menu_item9, menu_item10};
Line 209... Line 209...
209
    if (COSD_FLAGS & COSD_FLAG_WARNINGS) {
209
    if (COSD_FLAGS & COSD_FLAG_WARNINGS) {
210
        write_ascii_string_pgm(23, 7, ON);
210
        write_ascii_string_pgm(23, 7, ON);
211
    } else {
211
    } else {
212
        write_ascii_string_pgm(23, 7, OFF);
212
        write_ascii_string_pgm(23, 7, OFF);
213
    }
213
    }
-
 
214
    if (COSD_FLAGS & COSD_FLAG_STROMVOLT) {
-
 
215
        write_ascii_string_pgm(23, 8, ON);
-
 
216
    } else {
-
 
217
        write_ascii_string_pgm(23, 8, OFF);
-
 
218
    }
214
        //write_ndigit_number_u(23, 10, COSD_DISPLAYMODE, 10, 0);
219
        //write_ndigit_number_u(23, 10, COSD_DISPLAYMODE, 10, 0);
215
        write_ascii_string_pgm(18, 10, (const char *) (pgm_read_word(&(mode->desc))));
220
        write_ascii_string_pgm(18, 10, (const char *) (pgm_read_word(&(mode->desc))));
Line 216... Line 221...
216
       
221
       
Line 298... Line 303...
298
                    break;
303
                    break;
299
                case 5: // warnings
304
                case 5: // warnings
300
                    COSD_FLAGS ^= COSD_FLAG_WARNINGS;
305
                    COSD_FLAGS ^= COSD_FLAG_WARNINGS;
301
                    config_menu_drawings(chosen);
306
                    config_menu_drawings(chosen);
302
                    break;
307
                    break;
303
                case 6: // reset uptime
308
                case 6: // 2nd voltage by c-strom
304
                    uptime = 0;
309
                    COSD_FLAGS ^= COSD_FLAG_STROMVOLT;
305
                    config_menu_doclick(chosen, menu);
310
                    config_menu_drawings(chosen);
306
                    break;
311
                    break;
307
                case 7: // re-request OSD data
312
                case 7: // reset uptime
308
#if FCONLY
-
 
309
                    // request data ever 100ms from FC;
-
 
310
                    usart1_request_mk_data(0, 'd', 100);
-
 
311
#else
-
 
312
                    // request OSD Data from NC every 100ms
-
 
313
                    usart1_request_mk_data(1, 'o', 100);
-
 
314
 
-
 
315
                    // and disable debug...
313
                    uptime = 0;
316
                    usart1_request_mk_data(0, 'd', 0);
-
 
317
#endif
-
 
318
                    config_menu_doclick(chosen, menu);
314
                    config_menu_doclick(chosen, menu);
319
                    break;
315
                    break;
320
                case 8: // change mode
316
                case 8: // change mode
321
                                        #if FCONLY
317
                                        #if FCONLY
322
                                        COSD_DISPLAYMODE = (COSD_DISPLAYMODE + 1) % (sizeof(fcdisplaymodes) / sizeof(displaymode_t));
318
                                        COSD_DISPLAYMODE = (COSD_DISPLAYMODE + 1) % (sizeof(fcdisplaymodes) / sizeof(displaymode_t));