Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 676 → Rev 677

/C-OSD/trunk/config.c/config.c
158,17 → 158,43
write_ascii_string_pgm(23, 2, VM_PAL);
}
 
// request version from board
rxd_buffer_locked = 0;
#if FCONLY
usart1_request_mk_data(0, 'v', 0);
write_ascii_string_pgm(2, 11, PSTR("FC VERSION: ........"));
#else
usart1_request_mk_data(1, 'v', 0);
write_ascii_string_pgm(2, 11, PSTR("NC VERSION: ........"));
#endif
// wait for response
while (rxd_buffer_locked == 0) {
asm("nop");
}
Decode64();
str_VersionInfo VersionInfo;
VersionInfo = *((str_VersionInfo*) pRxData);
write_ndigit_number_u(14, 11, VersionInfo.SWMajor, 3, 1);
write_ndigit_number_u(18, 11, VersionInfo.SWMinor, 3, 1);
write_ascii_char(22 + 11*30, 'a' + VersionInfo.SWPatch);
// end version request
 
 
#if FCONLY
COSD_DISPLAYMODE %= (sizeof(fcdisplaymodes) / sizeof(displaymode_t));
mode = fcdisplaymodes;
mode += COSD_DISPLAYMODE;
osd_fcmode = (int(*)(void)) pgm_read_word(&mode->dfun);
// re-request data ever 100ms from FC;
usart1_request_mk_data(0, 'd', 100);
#else
COSD_DISPLAYMODE %= (sizeof(ncdisplaymodes) / sizeof(displaymode_t));
mode = ncdisplaymodes;
mode += COSD_DISPLAYMODE;
osd_ncmode = (int(*)(void)) pgm_read_word(&mode->dfun);
// re-request OSD Data from NC every 100ms
usart1_request_mk_data(1, 'o', 100);
#endif
 
_delay_ms(200);