Subversion Repositories Projects

Compare Revisions

Regard whitespace Rev 1197 → Rev 1281

/C-OSD/trunk/config.c
51,13 → 51,12
 
const displaymode_t * mode;
 
 
/**
* read data saved in eeprom, print out message if <verbose> is set
*/
void get_eeprom(uint8_t verbose) {
if (eeprom_read_byte(&ee_checkbyte1) == CHECKBYTE1 && eeprom_read_byte(&ee_checkbyte2) == CHECKBYTE2) {
if (verbose) write_ascii_string_pgm(2, 2, PSTR("Loading from EEPROM")); // Loading data
if (verbose) write_ascii_string_pgm(2, 6, PSTR("Loading from EEPROM")); // Loading data
COSD_FLAGS_MODES = eeprom_read_byte(&ee_COSD_FLAGS_MODES);
COSD_FLAGS_CONFIG = eeprom_read_byte(&ee_COSD_FLAGS_CONFIG);
COSD_DISPLAYMODE = eeprom_read_byte(&ee_COSD_DISPLAYMODE);
66,7 → 65,7
scope[i] = eeprom_read_byte(&ee_COSD_SCOPE[i]);
}
} else {
if (verbose) write_ascii_string_pgm(2, 2, PSTR("No Data in EEPROM")); // Loading data
if (verbose) write_ascii_string_pgm(2, 6, PSTR("No Data in EEPROM")); // Loading data
}
}
 
89,13 → 88,27
*/
void init_cosd(uint8_t UBat) {
clear();
write_ascii_string_pgm(2, 1, PSTR("C-OSD Init"));
write_ascii_string_pgm(2, 4, PSTR(BUILDDATE));
 
write_ascii_string_pgm(2, 1, PSTR("C-OSD"));
write_ascii_string_pgm(3, 2, PSTR("boot"));
draw_logo(11, 1);
 
write_ascii_string_pgm(2, 5, PSTR(BUILDDATE));
 
get_eeprom(1);
 
//write_ascii_string_pgm(23, 2, vm[COSD_FLAGS & COSD_FLAG_NTSC]);
if (COSD_FLAGS_CONFIG & COSD_FLAG_NTSC) {
write_ascii_string_pgm(23, 1, VM_NTSC);
} else {
write_ascii_string_pgm(23, 1, VM_PAL);
}
 
 
#if FCONLY
write_ascii_string_pgm(2, 3, PSTR("FC only Mode"));
write_ascii_string_pgm(2, 4, PSTR("FC only Mode"));
#else
write_ascii_string_pgm(2, 3, PSTR("NaviCtrl Mode"));
write_ascii_string_pgm(2, 4, PSTR("NaviCtrl Mode"));
 
usart1_EnableTXD();
usart1_puts_pgm(PSTR(REQUEST_UART_TO_FC));
110,9 → 123,9
paramset_serial setting;
setting = *((paramset_serial*)pRxData);
 
write_ascii_string_pgm(2, 6, PSTR("Setting :"));
write_ndigit_number_u(10, 6, setting.SettingsIndex, 1, 1);
write_ascii_string_len(13, 6, setting.param.Name, 12);
write_ascii_string_pgm(2, 7, PSTR("Setting :"));
write_ndigit_number_u(10, 7, setting.SettingsIndex, 1, 1);
write_ascii_string_len(13, 7, setting.param.Name, 12);
 
uint8_t cells = 0;
write_ascii_string_pgm(2, 8, PSTR("Battery:")); // Guessing Number of Cells
145,14 → 158,7
write_ascii_string_pgm(14, 9, PSTR("Max:")); // Max Voltage
write_ndigit_number_s_10th(20, 9, max_voltage, 3, 0);
 
get_eeprom(1);
 
//write_ascii_string_pgm(23, 2, vm[COSD_FLAGS & COSD_FLAG_NTSC]);
if (COSD_FLAGS_CONFIG & COSD_FLAG_NTSC) {
write_ascii_string_pgm(23, 1, VM_NTSC);
} else {
write_ascii_string_pgm(23, 1, VM_PAL);
}
 
// request version from board
#if FCONLY