Rev 468 | Rev 474 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 468 | Rev 471 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | * You should have received a copy of the GNU General Public License * |
15 | * You should have received a copy of the GNU General Public License * |
16 | * along with this program; if not, write to the * |
16 | * along with this program; if not, write to the * |
17 | * Free Software Foundation, Inc., * |
17 | * Free Software Foundation, Inc., * |
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
19 | ****************************************************************************/ |
19 | ****************************************************************************/ |
20 | - | ||
- | 20 | if (COSD_FLAGS & COSD_FLAG_HUD) { |
|
21 | // write icons at init or after menu/mode-switch |
21 | // write icons at init or after menu/mode-switch |
22 | if (!(COSD_FLAGS & COSD_ICONS_WRITTEN)) { |
22 | if (!(COSD_FLAGS2 & COSD_ICONS_WRITTEN)) { |
23 | write_char_xy(10, top_line, 0xCA); // RC-transmitter |
23 | write_char_xy(10, top_line, 0xCA); // RC-transmitter |
24 | write_char_xy(27, top_line, 0xCC); // small meters m height |
24 | write_char_xy(27, top_line, 0xCC); // small meters m height |
25 | write_char_xy(7, bottom_line, 0x9E); // small v |
25 | write_char_xy(7, bottom_line, 0x9E); // small v |
26 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
26 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
27 | write_char_xy(7, bottom_line - 1, 0x9F); // small A |
27 | write_char_xy(7, bottom_line - 1, 0x9F); // small A |
28 | write_char_xy(14, bottom_line - 1, 0xB5); // mah |
28 | write_char_xy(14, bottom_line - 1, 0xB5); // mah |
29 | } |
29 | } |
30 | COSD_FLAGS |= COSD_ICONS_WRITTEN; |
30 | COSD_FLAGS2 |= COSD_ICONS_WRITTEN; |
31 | } |
31 | } |
Line 32... | Line 32... | ||
32 | 32 | ||
33 | write_ndigit_number_u(7, top_line, debugData.Analog[10], 100, 0); |
33 | write_ndigit_number_u(7, top_line, debugData.Analog[10], 100, 0); |
34 | if (debugData.Analog[10] <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) { |
34 | if (debugData.Analog[10] <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) { |
35 | for (uint8_t x = 0; x < 4; x++) |
35 | for (uint8_t x = 0; x < 4; x++) |
36 | write_char_att_xy(7 + x, top_line, BLINK); |
36 | write_char_att_xy(7 + x, top_line, BLINK); |
37 | } else if (debugData.Analog[10] > RCLVL_WRN && last_RC_Quality <= RCLVL_WRN) { |
37 | } else if (debugData.Analog[10] > RCLVL_WRN && last_RC_Quality <= RCLVL_WRN) { |
38 | for (uint8_t x = 0; x < 4; x++) |
38 | for (uint8_t x = 0; x < 4; x++) |
39 | write_char_att_xy(7 + x, top_line, 0); |
39 | write_char_att_xy(7 + x, top_line, 0); |
40 | } |
- | |
41 | last_RC_Quality = debugData.Analog[10]; |
- | |
Line 42... | Line 40... | ||
42 | 40 | } |
|
43 | 41 | ||
44 | if (debugData.Analog[5] > 300 || debugData.Analog[5] < -300) { |
42 | if (debugData.Analog[5] > 300 || debugData.Analog[5] < -300) { |
45 | // above 10m only write full meters |
43 | // above 10m only write full meters |
Line 56... | Line 54... | ||
56 | 54 | ||
57 | // pre-bottom line |
55 | // pre-bottom line |
58 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
56 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
59 | //write_ndigit_number_s(3, bottom_line - 1, ampere, 1000, 0); |
57 | //write_ndigit_number_s(3, bottom_line - 1, ampere, 1000, 0); |
- | 58 | write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 100, 0); |
|
60 | write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 100, 0); |
59 | write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 1000, 0); |
Line 61... | Line 60... | ||
61 | } |
60 | } |
62 | 61 | ||
63 | draw_battery(2, bottom_line, min_voltage, debugData.Analog[9], max_voltage); |
62 | draw_battery(2, bottom_line, min_voltage, debugData.Analog[9], max_voltage); |
Line 67... | Line 66... | ||
67 | write_char_att_xy(x, bottom_line, BLINK); |
66 | write_char_att_xy(x, bottom_line, BLINK); |
68 | } else if (debugData.Analog[9] > min_voltage && last_UBat < min_voltage) { |
67 | } else if (debugData.Analog[9] > min_voltage && last_UBat < min_voltage) { |
69 | for (uint8_t x = 2; x < 8; x++) |
68 | for (uint8_t x = 2; x < 8; x++) |
70 | write_char_att_xy(x, bottom_line, 0); |
69 | write_char_att_xy(x, bottom_line, 0); |
71 | } |
70 | } |
- | 71 | } |
|
72 | // remember last values |
72 | // remember last values |
73 | last_UBat = debugData.Analog[9]; |
73 | last_UBat = debugData.Analog[9]; |
- | 74 | last_RC_Quality = debugData.Analog[10]; |
|
Line 74... | Line 75... | ||
74 | 75 | ||
75 | /* |
76 | /* |
76 | debugData.Analog[0]); // AngleNick |
77 | debugData.Analog[0]); // AngleNick |
77 | debugData.Analog[1]); // AngleRoll |
78 | debugData.Analog[1]); // AngleRoll |