Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 384 → Rev 385

/C-OSD/trunk/main.c
142,7 → 142,7
* timer kicks in every 1000uS ^= 1ms
*/
ISR(TIMER0_OVF_vect) {
OCR0 = 6; // preload
OCR0 = 15; // preload
if (!timer--) {
uptime++;
timer = 999;
621,7 → 621,7
 
// set up timer
TCCR0 |= (1 << CS00) | (1 << CS01); // timer0 prescaler 64
OCR0 = 6; // preload
OCR0 = 15; // preload
TIMSK |= (1 << TOIE0); // enable overflow timer0
 
// enable interrupts
671,7 → 671,7
usart1_request_mk_data(1, 'o', 100);
 
// and disable debug...
//usart1_request_mk_data(0, 'd', 0);
usart1_request_mk_data(0, 'd', 0);
 
// disable TXD-pin
usart1_DisableTXD();
698,18 → 698,18
while (1) {
// write icons at init or after menu/mode-switch
if (!(COSD_FLAGS & COSD_ICONS_WRITTEN) && (COSD_FLAGS & COSD_FLAG_HUD)) {
write_char_xy(5, top_line, 203); // km/h
write_char_xy(10, top_line, 202); // RC-transmitter
write_char_xy(16, top_line, 208); // degree symbol
write_char_xy(27, top_line, 204); // small meters m height
write_char_xy(20, top_line+1, 0xb0); // left circle
write_char_xy(22, top_line+1, 0xb2); // right circle
write_char_xy(27, top_line+1, 204); // small meters m home
//write_ascii_string(6, bottom_line, "V"); // voltage
write_char_xy(14, bottom_line, 209); // on clock
write_char_xy(22, bottom_line, 210); // fly clock
write_char_xy(26, bottom_line, 200); // sat1
write_char_xy(27, bottom_line, 201); // sat2
write_char_xy(5, top_line, 0xCB); // km/h
write_char_xy(10, top_line, 0xCA); // RC-transmitter
write_char_xy(16, top_line, 0xD0); // degree symbol
write_char_xy(27, top_line, 0xCC); // small meters m height
write_char_xy(20, top_line+1, 0xB0); // left circle
write_char_xy(22, top_line+1, 0xB2); // right circle
write_char_xy(27, top_line+1, 0xCC); // small meters m home
write_char_xy(7, bottom_line, 0x9E); // small v
write_char_xy(14, bottom_line, 0xD1); // on clock
write_char_xy(22, bottom_line, 0xD2); // fly clock
write_char_xy(26, bottom_line, 0xC8); // sat1
write_char_xy(27, bottom_line, 0xC9); // sat2
COSD_FLAGS |= COSD_ICONS_WRITTEN;
}
if (rxd_buffer_locked) {
806,15 → 806,16
}
 
// bottom line
write_ndigit_number_u_10th(2, bottom_line, naviData.UBat, 100, 0);
draw_battery(2, bottom_line, naviData.UBat);
write_ndigit_number_u_10th(3, bottom_line, naviData.UBat, 100, 0);
if (naviData.UBat <= UBAT_WRN && last_UBat > UBAT_WRN) {
for (uint8_t x = 0; x < 7; x++)
for (uint8_t x = 2; x < 8; x++)
write_char_att_xy(x, bottom_line, BLINK);
} else {
for (uint8_t x = 0; x < 7; x++)
for (uint8_t x = 2; x < 8; x++)
write_char_att_xy(x, bottom_line, 0);
}
draw_battery(6, bottom_line, naviData.UBat);
 
write_time(8, bottom_line, uptime);
write_time(16, bottom_line, naviData.FlyingTime);