Rev 507 | Rev 523 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 507 | Rev 519 | ||
---|---|---|---|
Line 40... | Line 40... | ||
40 | } |
40 | } |
41 | } |
41 | } |
42 | COSD_FLAGS2 |= COSD_ICONS_WRITTEN; |
42 | COSD_FLAGS2 |= COSD_ICONS_WRITTEN; |
43 | } |
43 | } |
Line 44... | Line 44... | ||
44 | 44 | ||
45 | write_ndigit_number_u(7, top_line, debugData.Analog[10], 100, 0); |
45 | write_ndigit_number_u(7, top_line, debugData.Analog[10], 3, 0); |
46 | if (debugData.Analog[10] <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) { |
46 | if (debugData.Analog[10] <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) { |
47 | for (uint8_t x = 0; x < 4; x++) |
47 | for (uint8_t x = 0; x < 4; x++) |
48 | write_char_att_xy(7 + x, top_line, BLINK); |
48 | write_char_att_xy(7 + x, top_line, BLINK); |
49 | } else if (debugData.Analog[10] > RCLVL_WRN && last_RC_Quality <= RCLVL_WRN) { |
49 | } else if (debugData.Analog[10] > RCLVL_WRN && last_RC_Quality <= RCLVL_WRN) { |
50 | for (uint8_t x = 0; x < 4; x++) |
50 | for (uint8_t x = 0; x < 4; x++) |
51 | write_char_att_xy(7 + x, top_line, 0); |
51 | write_char_att_xy(7 + x, top_line, 0); |
Line 52... | Line 52... | ||
52 | } |
52 | } |
53 | 53 | ||
54 | if (debugData.Analog[5] > 300 || debugData.Analog[5] < -300) { |
54 | if (debugData.Analog[5] > 300 || debugData.Analog[5] < -300) { |
55 | // above 10m only write full meters |
55 | // above 10m only write full meters |
56 | write_ndigit_number_s(23, top_line, debugData.Analog[5] / 30, 1000, 0); |
56 | write_ndigit_number_s(23, top_line, debugData.Analog[5] / 30, 4, 0); |
57 | } else { |
57 | } else { |
58 | // up to 10m write meters.dm |
58 | // up to 10m write meters.dm |
59 | write_ndigit_number_s_10th(23, top_line, debugData.Analog[5] / 3, 100, 0); |
59 | write_ndigit_number_s_10th(23, top_line, debugData.Analog[5] / 3, 3, 0); |
Line 60... | Line 60... | ||
60 | } |
60 | } |
61 | if (debugData.Analog[5] > max_Altimeter) max_Altimeter = debugData.Analog[5]; |
61 | if (debugData.Analog[5] > max_Altimeter) max_Altimeter = debugData.Analog[5]; |
62 | 62 | ||
Line 63... | Line 63... | ||
63 | if (COSD_FLAGS & COSD_FLAG_ARTHORIZON) { |
63 | if (COSD_FLAGS & COSD_FLAG_ARTHORIZON) { |
64 | draw_artificial_horizon(top_line + 2, bottom_line - 1, debugData.Analog[0], debugData.Analog[1]); |
64 | draw_artificial_horizon(top_line + 2, bottom_line - 1, debugData.Analog[0], debugData.Analog[1]); |
65 | } |
65 | } |
66 | 66 | ||
67 | // pre-bottom line |
67 | // pre-bottom line |
68 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
68 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
69 | //write_ndigit_number_s(3, bottom_line - 1, ampere, 1000, 0); |
69 | //write_ndigit_number_s(3, bottom_line - 1, ampere, 4, 0); |
70 | write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 100, 0); |
70 | write_ndigit_number_u_10th(3, bottom_line - 1, ampere / 10, 3, 0); |
71 | write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 1000, 0); |
71 | write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 4, 0); |
Line 72... | Line 72... | ||
72 | if (COSD_FLAGS & COSD_FLAG_STROMVOLT) { |
72 | if (COSD_FLAGS & COSD_FLAG_STROMVOLT) { |
73 | write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 100, 0); |
73 | write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 3, 0); |
74 | } |
74 | } |
75 | } |
75 | } |
76 | 76 | ||
77 | draw_battery(2, bottom_line, min_voltage, debugData.Analog[9], max_voltage); |
77 | draw_battery(2, bottom_line, min_voltage, debugData.Analog[9], max_voltage); |
78 | write_ndigit_number_u_10th(3, bottom_line, debugData.Analog[9], 100, 0); |
78 | write_ndigit_number_u_10th(3, bottom_line, debugData.Analog[9], 3, 0); |