Rev 335 | Rev 339 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 335 | Rev 336 | ||
---|---|---|---|
Line 513... | Line 513... | ||
513 | char* directions[8] = {"NE", "E ", "SE", "S ", "SW", "W ", "NW", "N "}; |
513 | char* directions[8] = {"NE", "E ", "SE", "S ", "SW", "W ", "NW", "N "}; |
514 | char arrowdir[8] = { 218, 217, 224, 223, 222, 221, 220, 219}; |
514 | char arrowdir[8] = { 218, 217, 224, 223, 222, 221, 220, 219}; |
Line 515... | Line 515... | ||
515 | 515 | ||
516 | while (1) { |
516 | while (1) { |
517 | // write icons at init or after menu/mode-switch |
517 | // write icons at init or after menu/mode-switch |
518 | if (!(COSD_FLAGS & COSD_ICONS_WRITTEN)) { |
518 | if (!(COSD_FLAGS & COSD_ICONS_WRITTEN) && !(COSD_FLAGS & COSD_FLAG_NOOSD)) { |
519 | write_char_xy(5, top_line, 203); // km/h |
519 | write_char_xy(5, top_line, 203); // km/h |
520 | write_char_xy(10, top_line, 202); // RC-transmitter |
520 | write_char_xy(10, top_line, 202); // RC-transmitter |
521 | write_char_xy(16, top_line, 208); // degree symbol |
521 | write_char_xy(16, top_line, 208); // degree symbol |
522 | write_char_xy(27, top_line, 204); // small meters m |
522 | write_char_xy(27, top_line, 204); // small meters m |
Line 526... | Line 526... | ||
526 | write_char_xy(26, bottom_line, 200); // sat1 |
526 | write_char_xy(26, bottom_line, 200); // sat1 |
527 | write_char_xy(27, bottom_line, 201); // sat2 |
527 | write_char_xy(27, bottom_line, 201); // sat2 |
528 | COSD_FLAGS |= COSD_ICONS_WRITTEN; |
528 | COSD_FLAGS |= COSD_ICONS_WRITTEN; |
529 | } |
529 | } |
530 | if (rxd_buffer_locked) { |
530 | if (rxd_buffer_locked) { |
- | 531 | if (!(COSD_FLAGS & COSD_FLAG_NOOSD)) { |
|
531 | if (rxd_buffer[2] == 'D') { // FC Data |
532 | if (rxd_buffer[2] == 'D') { // FC Data |
532 | /*Decode64(); |
533 | /*Decode64(); |
533 | debugData = *((DebugOut_t*) pRxData); |
534 | debugData = *((DebugOut_t*) pRxData); |
534 | write_number_s(12, 2, RxDataLen); |
535 | write_number_s(12, 2, RxDataLen); |
535 | write_number_s(20, 2, setsReceived++); |
536 | write_number_s(20, 2, setsReceived++); |
Line 572... | Line 573... | ||
572 | write_char_xy(20, top_line, 233); //big arrow down |
573 | write_char_xy(20, top_line, 233); //big arrow down |
573 | } |
574 | } |
Line 574... | Line 575... | ||
574 | 575 | ||
575 | // TODO: is this really dm? |
576 | // TODO: is this really dm? |
- | 577 | //note:lephisto:according to several sources it's /30 |
|
- | 578 | //write_number_s(22, top_line, naviData.Altimeter/30); |
|
- | 579 | if (naviData.Altimeter > 300) { |
|
576 | //note:lephisto:according to several sources it's /30 |
580 | // above 10m only write full meters |
- | 581 | write_number_s(22, top_line, naviData.Altimeter/30); |
|
- | 582 | } else { |
|
- | 583 | // up to 10m write meters.dm |
|
- | 584 | write_number_u_10th(21, top_line, naviData.Altimeter/3); |
|
Line 577... | Line 585... | ||
577 | write_number_s(22, top_line, naviData.Altimeter/30); |
585 | } |
578 | 586 | ||
Line 579... | Line 587... | ||
579 | // seccond line |
587 | // seccond line |
Line 597... | Line 605... | ||
597 | draw_artificial_horizon(top_line + 2, bottom_line - 1, naviData.AngleNick, naviData.AngleRoll); |
605 | draw_artificial_horizon(top_line + 2, bottom_line - 1, naviData.AngleNick, naviData.AngleRoll); |
598 | } |
606 | } |
599 | } else { |
607 | } else { |
600 | // stats |
608 | // stats |
601 | write_ascii_string(2, 5, "max Altitude:"); |
609 | write_ascii_string(2, 5, "max Altitude:"); |
602 | write_number_s(17, 5, max_Altimeter/10); |
610 | write_number_s(17, 5, max_Altimeter/30); |
603 | write_char_xy(22, 5, 204); // small meters m |
611 | write_char_xy(22, 5, 204); // small meters m |
604 | write_ascii_string(2, 6, "max Speed :"); |
612 | write_ascii_string(2, 6, "max Speed :"); |
605 | write_3digit_number_u(19, 6, (uint16_t)(((uint32_t)max_GroundSpeed*36)/1000)); |
613 | write_3digit_number_u(19, 6, (uint16_t)(((uint32_t)max_GroundSpeed*36)/1000)); |
606 | write_char_xy(22, 6, 203); // km/h |
614 | write_char_xy(22, 6, 203); // km/h |
607 | write_ascii_string(2, 7, "max Distance:"); |
615 | write_ascii_string(2, 7, "max Distance:"); |
Line 650... | Line 658... | ||
650 | } |
658 | } |
651 | if (naviData.UBat < min_UBat) min_UBat = naviData.UBat; |
659 | if (naviData.UBat < min_UBat) min_UBat = naviData.UBat; |
652 | if (naviData.FlyingTime > max_FlyingTime) max_FlyingTime = naviData.FlyingTime; |
660 | if (naviData.FlyingTime > max_FlyingTime) max_FlyingTime = naviData.FlyingTime; |
Line 653... | Line 661... | ||
653 | 661 | ||
- | 662 | old_MKFlags = naviData.MKFlags; |
|
654 | old_MKFlags = naviData.MKFlags; |
663 | } // (!(COSD_FLAGS & COSD_FLAG_NOOSD)) |
655 | } |
664 | } |
656 | seconds_since_last_data = 0; |
665 | seconds_since_last_data = 0; |
657 | rxd_buffer_locked = 0; |
666 | rxd_buffer_locked = 0; |
658 | } |
667 | } |