Rev 401 | Rev 403 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 401 | Rev 402 | ||
---|---|---|---|
Line 351... | Line 351... | ||
351 | } else { |
351 | } else { |
352 | // PAL + enable display immediately (VM0) |
352 | // PAL + enable display immediately (VM0) |
353 | spi_send_byte(0x00, 0b01001000); |
353 | spi_send_byte(0x00, 0b01001000); |
354 | } |
354 | } |
Line 355... | Line -... | ||
355 | - | ||
356 | // clear all display-mem (DMM) |
- | |
357 | spi_send_byte(0x04, 0b00000100); |
- | |
358 | - | ||
359 | // clearing takes 12uS according to maxim so lets wait longer |
- | |
360 | _delay_us(120); |
- | |
361 | 355 | ||
362 | // 8bit mode |
356 | // 8bit mode |
Line 363... | Line 357... | ||
363 | spi_send_byte(0x04, 0b01000000); |
357 | spi_send_byte(0x04, 0b01000000); |
364 | 358 | ||
Line 365... | Line 359... | ||
365 | // write blank chars to whole screen |
359 | // clear display |
366 | clear(); |
360 | clear(); |
367 | 361 | ||
Line 506... | Line 500... | ||
506 | if (COSD_FLAGS & COSD_FLAG_STATS) { |
500 | if (COSD_FLAGS & COSD_FLAG_STATS) { |
507 | write_ascii_string_pgm(2, 5, stats_item_pointers[0]); // max Altitude |
501 | write_ascii_string_pgm(2, 5, stats_item_pointers[0]); // max Altitude |
508 | write_ndigit_number_s(18, 5, max_Altimeter / 30, 1000, 0); |
502 | write_ndigit_number_s(18, 5, max_Altimeter / 30, 1000, 0); |
509 | write_char_xy(22, 5, 204); // small meters m |
503 | write_char_xy(22, 5, 204); // small meters m |
510 | write_ascii_string_pgm(2, 6, stats_item_pointers[1]); // max Speed |
504 | write_ascii_string_pgm(2, 6, stats_item_pointers[1]); // max Speed |
511 | write_ndigit_number_u(19, 6, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t)9) / (uint32_t)250), 100, 0); |
505 | write_ndigit_number_u(19, 6, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t)9) / (uint32_t)250), 100, 0); |
512 | write_char_xy(22, 6, 203); // km/h |
506 | write_char_xy(22, 6, 203); // km/h |
513 | write_ascii_string_pgm(2, 7, stats_item_pointers[2]); // max Distance |
507 | write_ascii_string_pgm(2, 7, stats_item_pointers[2]); // max Distance |
514 | write_ndigit_number_u(19, 7, max_Distance / 100, 100, 0); |
508 | write_ndigit_number_u(19, 7, max_Distance / 100, 100, 0); |
515 | write_char_xy(22, 7, 204); // small meters m |
509 | write_char_xy(22, 7, 204); // small meters m |
516 | write_ascii_string_pgm(2, 8, stats_item_pointers[3]); // min voltage |
510 | write_ascii_string_pgm(2, 8, stats_item_pointers[3]); // min voltage |