Subversion Repositories Projects

Rev

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

Rev 467 Rev 468
Line 28... Line 28...
28
    write_char_xy(22, top_line + 1, 0xB2); // right circle
28
    write_char_xy(22, top_line + 1, 0xB2); // right circle
29
    write_char_xy(27, top_line + 1, 0xCC); // small meters m home
29
    write_char_xy(27, top_line + 1, 0xCC); // small meters m home
30
    write_char_xy(7, bottom_line, 0x9E); // small V
30
    write_char_xy(7, bottom_line, 0x9E); // small V
31
        if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
31
        if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
32
                write_char_xy(7, bottom_line - 1, 0x9F); // small A
32
                write_char_xy(7, bottom_line - 1, 0x9F); // small A
-
 
33
                write_char_xy(14, bottom_line - 1, 0xB5); // mah
33
        }
34
        }
34
    write_char_xy(14, bottom_line, 0xD1); // on clock
35
    write_char_xy(14, bottom_line, 0xD1); // on clock
35
    write_char_xy(21, bottom_line, 0xD2); // fly clock
36
    write_char_xy(21, bottom_line, 0xD2); // fly clock
36
    write_char_xy(26, bottom_line, 0xC8); // sat1
37
    write_char_xy(26, bottom_line, 0xC8); // sat1
37
    write_char_xy(27, bottom_line, 0xC9); // sat2
38
    write_char_xy(27, bottom_line, 0xC9); // sat2
Line 97... Line 98...
97
    // motors are on, assume we were/are flying
98
    // motors are on, assume we were/are flying
98
    COSD_FLAGS |= COSD_WASFLYING;
99
    COSD_FLAGS |= COSD_WASFLYING;
99
} else {
100
} else {
100
    // stats
101
    // stats
101
    if ((COSD_FLAGS & COSD_WASFLYING) && (COSD_FLAGS & COSD_FLAG_STATS)) {
102
    if ((COSD_FLAGS & COSD_WASFLYING) && (COSD_FLAGS & COSD_FLAG_STATS)) {
102
                uint8_t line = 4;
103
                uint8_t line = 3;
103
        write_ascii_string_pgm(2, line, stats_item_pointers[0]); // max Altitude
104
        write_ascii_string_pgm(2, line, stats_item_pointers[0]); // max Altitude
104
        write_ndigit_number_s(18, line, max_Altimeter / 30, 1000, 0);
105
        write_ndigit_number_s(18, line, max_Altimeter / 30, 1000, 0);
105
        write_char_xy(22, line, 204); // small meters m
106
        write_char_xy(22, line, 204); // small meters m
106
        write_ascii_string_pgm(2, ++line, stats_item_pointers[1]); // max Speed
107
        write_ascii_string_pgm(2, ++line, stats_item_pointers[1]); // max Speed
107
        write_ndigit_number_u(19, line, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 100, 0);
108
        write_ndigit_number_u(19, line, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 100, 0);
Line 113... Line 114...
113
        write_ndigit_number_u_10th(18, line, min_UBat, 100, 0);
114
        write_ndigit_number_u_10th(18, line, min_UBat, 100, 0);
114
        write_char_xy(22, line, 0x9E); // small v
115
        write_char_xy(22, line, 0x9E); // small v
115
                if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
116
                if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
116
                        write_ascii_string_pgm(2, ++line, stats_item_pointers[7]); // ampere
117
                        write_ascii_string_pgm(2, ++line, stats_item_pointers[7]); // ampere
117
                        write_ndigit_number_u_10th(18, line, max_ampere / 10, 100, 0);
118
                        write_ndigit_number_u_10th(18, line, max_ampere / 10, 100, 0);
118
                        write_char_xy(22, line, 0x9F); // small v
-
 
119
                }
119
                }
120
        write_ascii_string_pgm(2, ++line, stats_item_pointers[4]); // max time
120
        write_ascii_string_pgm(2, ++line, stats_item_pointers[4]); // max time
121
        write_time(16, line, max_FlyingTime);
121
        write_time(16, line, max_FlyingTime);
122
        write_char_xy(22, line, 210); // fly clock
122
        write_char_xy(22, line, 210); // fly clock
123
        write_ascii_string_pgm(2, ++line, stats_item_pointers[5]); // longitude
123
        write_ascii_string_pgm(2, ++line, stats_item_pointers[5]); // longitude
Line 134... Line 134...
134
 
134
 
135
// pre-bottom line
135
// pre-bottom line
136
if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
136
if (COSD_FLAGS2 & COSD_FLAG_STROMREC) {
137
        //write_ndigit_number_s(3, bottom_line - 1, ampere, 1000, 0);
137
        //write_ndigit_number_s(3, bottom_line - 1, ampere, 1000, 0);
-
 
138
        write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 100, 0);
138
        write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 100, 0);
139
        write_ndigit_number_s(10, bottom_line - 1, ampere_wasted, 1000, 0);
Line 139... Line 140...
139
}
140
}
140
 
141
 
141
// bottom line
142
// bottom line