Subversion Repositories Projects

Rev

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

Rev 800 Rev 826
Line 148... Line 148...
148
    //usart1_request_mk_data(0, 'v', 0);
148
    //usart1_request_mk_data(0, 'v', 0);
149
    write_ascii_string_pgm(2, 11, PSTR("FC VERSION: ........"));
149
    write_ascii_string_pgm(2, 11, PSTR("FC VERSION: ........"));
150
    usart1_request_blocking('V', PSTR(REQUEST_FC_VERSION));
150
    usart1_request_blocking('V', PSTR(REQUEST_FC_VERSION));
151
#else
151
#else
152
    usart1_request_nc_uart();
152
    usart1_request_nc_uart();
-
 
153
    _delay_ms(200);
-
 
154
    usart1_request_nc_uart();
-
 
155
   
153
    //usart1_request_mk_data(1, 'v', 0);
156
    //usart1_request_mk_data(1, 'v', 0);
154
    write_ascii_string_pgm(2, 11, PSTR("NC VERSION: ........"));
157
    write_ascii_string_pgm(2, 11, PSTR("NC VERSION: ........"));
155
    usart1_request_blocking('V', PSTR(REQUEST_NC_VERSION));
158
    usart1_request_blocking('V', PSTR(REQUEST_NC_VERSION));
156
#endif
159
#endif
157
    str_VersionInfo VersionInfo;
160
    str_VersionInfo VersionInfo;
Line 183... Line 186...
183
 
186
 
184
    _delay_ms(5000);
187
    _delay_ms(5000);
185
    clear();
188
    clear();
186
    // update flags to paint display again because of clear
189
    // update flags to paint display again because of clear
-
 
190
    COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN;
-
 
191
 
-
 
192
    // we got data
187
    COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN;
193
    COSD_FLAGS_RUNTIME |= COSD_DATARECEIVED;
Line 188... Line 194...
188
}
194
}
189
 
195
 
190
/* ##########################################################################
196
/* ##########################################################################
Line 265... Line 271...
265
    onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_CONFIG & COSD_FLAG_FEET);
271
    onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_CONFIG & COSD_FLAG_FEET);
Line 266... Line 272...
266
 
272
 
267
    write_ascii_string_pgm(MENU_MIDDLE, ++line, PSTR("Big Vario"));
273
    write_ascii_string_pgm(MENU_MIDDLE, ++line, PSTR("Big Vario"));
Line -... Line 274...
-
 
274
    onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_MODES & COSD_FLAG_BIGVARIO);
-
 
275
 
-
 
276
    write_ascii_string_pgm(MENU_MIDDLE, ++line, PSTR("Passive"));
-
 
277
    onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_CONFIG & COSD_FLAG_PASSIVE);
-
 
278
 
Line 268... Line 279...
268
    onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_MODES & COSD_FLAG_BIGVARIO);
279
    /*write_ascii_string_pgm(MENU_MIDDLE, ++line, PSTR("?????"));
269
 
280
    onoff(MENU_MIDDLE + 10, line, COSD_FLAGS_CONFIG & COSD_FLAG_PASSIVE);*/
Line 270... Line 281...
270
 
281
 
Line 309... Line 320...
309
    config_menu_drawings(chosen);
320
    config_menu_drawings(chosen);
Line 310... Line 321...
310
 
321
 
311
    while (inmenu) {
322
    while (inmenu) {
312
        if (s2_pressed()) {
323
        if (s2_pressed()) {
313
            chosen = (chosen + 1) % 17;
324
            chosen = (chosen + 1) % 17;
314
            if (chosen == 10) chosen = 13; // SKIP unused menu space for now
325
            if (chosen == 11) chosen = 13; // SKIP unused menu space for now
315
            config_menu_drawings(chosen);
326
            config_menu_drawings(chosen);
316
            _delay_ms(500);
327
            _delay_ms(500);
317
        } else if (s1_pressed()) {
328
        } else if (s1_pressed()) {
318
            switch (chosen) {
329
            switch (chosen) {
Line 356... Line 367...
356
                    COSD_FLAGS_CONFIG ^= COSD_FLAG_FEET;
367
                    COSD_FLAGS_CONFIG ^= COSD_FLAG_FEET;
357
                    break;
368
                    break;
358
                case 9: // big vario
369
                case 9: // big vario
359
                    COSD_FLAGS_MODES ^= COSD_FLAG_BIGVARIO;
370
                    COSD_FLAGS_MODES ^= COSD_FLAG_BIGVARIO;
360
                    break;
371
                    break;
-
 
372
                case 10: // passive
-
 
373
                    COSD_FLAGS_CONFIG ^= COSD_FLAG_PASSIVE;
-
 
374
                    break;
361
                case 13: // reset uptime
375
                case 13: // reset uptime
362
                    uptime = 0;
376
                    uptime = 0;
363
                    config_menu_doclick(chosen);
377
                    config_menu_doclick(chosen);
364
                    break;
378
                    break;
365
                case 14: // change mode
379
                case 14: // change mode