Subversion Repositories Projects

Rev

Rev 761 | Rev 783 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 761 Rev 766
Line 48... Line 48...
48
        write_ndigit_number_u(12, top_line, naviData.HomePositionDeviation.Distance / 10, 3, 0);
48
        write_ndigit_number_u(12, top_line, naviData.HomePositionDeviation.Distance / 10, 3, 0);
Line 49... Line 49...
49
 
49
 
50
        uint16_t heading_home = (naviData.HomePositionDeviation.Bearing + 360 - naviData.CompassHeading) % 360;
50
        uint16_t heading_home = (naviData.HomePositionDeviation.Bearing + 360 - naviData.CompassHeading) % 360;
Line 51... Line 51...
51
        write_char_xy(17, top_line, 0xa0 + heading_fine_conv(heading_home));
51
        write_char_xy(17, top_line, 0xa0 + heading_fine_conv(heading_home));
52
 
52
 
53
        if (naviData.Altimeter > 300 || naviData.Altimeter < -300) {
53
        if (naviData.Altimeter > 200 || naviData.Altimeter < -200) {
54
            // above 10m only write full meters
54
            // above 10m only write full meters
55
            write_ndigit_number_s(22, top_line, naviData.Altimeter / 30, 4, 0);
55
            write_ndigit_number_s(22, top_line, naviData.Altimeter / 20, 4, 0);
56
        } else {
56
        } else {
57
            // up to 10m write meters.dm
57
            // up to 10m write meters.dm
Line 58... Line 58...
58
            write_ndigit_number_s_10th(22, top_line, naviData.Altimeter / 3, 3, 0);
58
            write_ndigit_number_s_10th(22, top_line, naviData.Altimeter / 2, 3, 0);
Line 80... Line 80...
80
        } else {
80
        } else {
81
            // stats
81
            // stats
82
            if ((COSD_FLAGS_RUNTIME & COSD_WASFLYING) && (COSD_FLAGS_MODES & COSD_FLAG_STATS)) {
82
            if ((COSD_FLAGS_RUNTIME & COSD_WASFLYING) && (COSD_FLAGS_MODES & COSD_FLAG_STATS)) {
83
                uint8_t line = 3;
83
                uint8_t line = 3;
84
                write_ascii_string_pgm(2, line, (const char *)(pgm_read_word(&(stats_item_pointers[0])))); // max Altitude
84
                write_ascii_string_pgm(2, line, (const char *)(pgm_read_word(&(stats_item_pointers[0])))); // max Altitude
85
                write_ndigit_number_s(18, line, max_Altimeter / 30, 4, 0);
85
                write_ndigit_number_s(18, line, max_Altimeter / 20, 4, 0);
86
                write_char_xy(22, line, 204); // small meters m
86
                write_char_xy(22, line, 204); // small meters m
87
                write_ascii_string_pgm(2, ++line, (const char *)(pgm_read_word(&(stats_item_pointers[1])))); // max Speed
87
                write_ascii_string_pgm(2, ++line, (const char *)(pgm_read_word(&(stats_item_pointers[1])))); // max Speed
88
                write_ndigit_number_u(19, line, (uint16_t)(((uint32_t)max_GroundSpeed * (uint32_t)9) / (uint32_t)250), 3, 0);
88
                write_ndigit_number_u(19, line, (uint16_t)(((uint32_t)max_GroundSpeed * (uint32_t)9) / (uint32_t)250), 3, 0);
89
                write_char_xy(22, line, 203); // km/h
89
                write_char_xy(22, line, 203); // km/h
90
                write_ascii_string_pgm(2, ++line, (const char *)(pgm_read_word(&(stats_item_pointers[2])))); // max Distance
90
                write_ascii_string_pgm(2, ++line, (const char *)(pgm_read_word(&(stats_item_pointers[2])))); // max Distance