Rev 497 | Rev 507 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 497 | Rev 499 | ||
---|---|---|---|
Line 112... | Line 112... | ||
112 | COSD_FLAGS2 |= COSD_WASFLYING; |
112 | COSD_FLAGS2 |= COSD_WASFLYING; |
113 | } else { |
113 | } else { |
114 | // stats |
114 | // stats |
115 | if ((COSD_FLAGS2 & COSD_WASFLYING) && (COSD_FLAGS & COSD_FLAG_STATS)) { |
115 | if ((COSD_FLAGS2 & COSD_WASFLYING) && (COSD_FLAGS & COSD_FLAG_STATS)) { |
116 | uint8_t line = 3; |
116 | uint8_t line = 3; |
117 | write_ascii_string_pgm(2, line, stats_item_pointers[0]); // max Altitude |
117 | write_ascii_string_pgm(2, line, (const char *) (pgm_read_word(&(stats_item_pointers[0])))); // max Altitude |
118 | write_ndigit_number_s(18, line, max_Altimeter / 30, 1000, 0); |
118 | write_ndigit_number_s(18, line, max_Altimeter / 30, 1000, 0); |
119 | write_char_xy(22, line, 204); // small meters m |
119 | write_char_xy(22, line, 204); // small meters m |
120 | write_ascii_string_pgm(2, ++line, stats_item_pointers[1]); // max Speed |
120 | write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[1])))); // max Speed |
121 | write_ndigit_number_u(19, line, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 100, 0); |
121 | write_ndigit_number_u(19, line, (uint16_t) (((uint32_t) max_GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 100, 0); |
122 | write_char_xy(22, line, 203); // km/h |
122 | write_char_xy(22, line, 203); // km/h |
123 | write_ascii_string_pgm(2, ++line, stats_item_pointers[2]); // max Distance |
123 | write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[2])))); // max Distance |
124 | write_ndigit_number_u(19, line, max_Distance / 10, 100, 0); |
124 | write_ndigit_number_u(19, line, max_Distance / 10, 100, 0); |
125 | write_char_xy(22, line, 204); // small meters m |
125 | write_char_xy(22, line, 204); // small meters m |
126 | write_ascii_string_pgm(2, ++line, stats_item_pointers[3]); // min voltage |
126 | write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[3])))); // min voltage |
127 | write_ndigit_number_u_10th(18, line, min_UBat, 100, 0); |
127 | write_ndigit_number_u_10th(18, line, min_UBat, 100, 0); |
128 | write_char_xy(22, line, 0x9E); // small V |
128 | write_char_xy(22, line, 0x9E); // small V |
129 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
129 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
130 | write_ascii_string_pgm(2, ++line, stats_item_pointers[7]); // ampere |
130 | write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[7])))); // ampere |
131 | write_ndigit_number_u_10th(18, line, max_ampere / 10, 100, 0); |
131 | write_ndigit_number_u_10th(18, line, max_ampere / 10, 100, 0); |
132 | write_char_xy(22, line, 0x9F); // small A |
132 | write_char_xy(22, line, 0x9F); // small A |
133 | } |
133 | } |
134 | write_ascii_string_pgm(2, ++line, stats_item_pointers[4]); // max time |
134 | write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[4])))); // max time |
135 | write_time(16, line, max_FlyingTime); |
135 | write_time(16, line, max_FlyingTime); |
136 | write_char_xy(22, line, 210); // fly clock |
136 | write_char_xy(22, line, 210); // fly clock |
137 | write_ascii_string_pgm(2, ++line, stats_item_pointers[5]); // longitude |
137 | write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[5])))); // longitude |
138 | write_gps_pos(15, line, naviData.CurrentPosition.Longitude); |
138 | write_gps_pos(15, line, naviData.CurrentPosition.Longitude); |
139 | write_ascii_string_pgm(2, ++line, stats_item_pointers[6]); // latitude |
139 | write_ascii_string_pgm(2, ++line, (const char *) (pgm_read_word(&(stats_item_pointers[6])))); // latitude |
140 | write_gps_pos(15, line, naviData.CurrentPosition.Latitude); |
140 | write_gps_pos(15, line, naviData.CurrentPosition.Latitude); |
141 | } else if (COSD_FLAGS & COSD_FLAG_ARTHORIZON) { // if no stats there is space horizon |
141 | } else if (COSD_FLAGS & COSD_FLAG_ARTHORIZON) { // if no stats there is space horizon |
142 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
142 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
143 | draw_artificial_horizon(top_line + 2, bottom_line - 2, naviData.AngleNick, naviData.AngleRoll); |
143 | draw_artificial_horizon(top_line + 2, bottom_line - 2, naviData.AngleNick, naviData.AngleRoll); |
144 | } else { |
144 | } else { |