Rev 519 | Rev 728 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 519 | Rev 523 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | #include "osd_fcmode_default.h" |
24 | #include "osd_fcmode_default.h" |
Line 25... | Line 25... | ||
25 | 25 | ||
Line 26... | Line 26... | ||
26 | #if !(ALLCHARSDEBUG|(WRITECHARS != -1)) |
26 | #if !(ALLCHARSDEBUG|(WRITECHARS != -1)) |
27 | 27 | ||
28 | int osd_fcmode_default() { |
28 | int osd_fcmode_default() { |
29 | if (COSD_FLAGS & COSD_FLAG_HUD) { |
29 | if (COSD_FLAGS_MODES & COSD_FLAG_HUD) { |
30 | // write icons at init or after menu/mode-switch |
30 | // write icons at init or after menu/mode-switch |
31 | if (!(COSD_FLAGS2 & COSD_ICONS_WRITTEN)) { |
31 | if (!(COSD_FLAGS_RUNTIME & COSD_ICONS_WRITTEN)) { |
32 | write_char_xy(10, top_line, 0xCA); // RC-transmitter |
32 | write_char_xy(10, top_line, 0xCA); // RC-transmitter |
33 | write_char_xy(27, top_line, 0xCC); // small meters m height |
33 | write_char_xy(27, top_line, 0xCC); // small meters m height |
34 | write_char_xy(7, bottom_line, 0x9E); // small v |
34 | write_char_xy(7, bottom_line, 0x9E); // small v |
35 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
35 | if (COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) { |
36 | write_char_xy(7, bottom_line - 1, 0x9F); // small A |
36 | write_char_xy(7, bottom_line - 1, 0x9F); // small A |
37 | write_char_xy(14, bottom_line - 1, 0xB5); // mah |
37 | write_char_xy(14, bottom_line - 1, 0xB5); // mah |
38 | if (COSD_FLAGS & COSD_FLAG_STROMVOLT) { |
38 | if (COSD_FLAGS_MODES & COSD_FLAG_STROMVOLT) { |
39 | write_char_xy(21, bottom_line - 1, 0x9E); // small V |
39 | write_char_xy(21, bottom_line - 1, 0x9E); // small V |
40 | } |
40 | } |
41 | } |
41 | } |
Line 42... | Line 42... | ||
42 | COSD_FLAGS2 |= COSD_ICONS_WRITTEN; |
42 | COSD_FLAGS_RUNTIME |= COSD_ICONS_WRITTEN; |
43 | } |
43 | } |
44 | 44 | ||
Line 58... | Line 58... | ||
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, 3, 0); |
59 | write_ndigit_number_s_10th(23, top_line, debugData.Analog[5] / 3, 3, 0); |
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]; |
Line 62... | Line 62... | ||
62 | 62 | ||
63 | if (COSD_FLAGS & COSD_FLAG_ARTHORIZON) { |
63 | if (COSD_FLAGS_MODES & 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]); |
Line 65... | Line 65... | ||
65 | } |
65 | } |
66 | 66 | ||
67 | // pre-bottom line |
67 | // pre-bottom line |
68 | if (COSD_FLAGS2 & COSD_FLAG_STROMREC) { |
68 | if (COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) { |
69 | //write_ndigit_number_s(3, bottom_line - 1, ampere, 4, 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, 3, 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, 4, 0); |
71 | write_ndigit_number_s(10, bottom_line - 1, ampere_wasted / 10, 4, 0); |
72 | if (COSD_FLAGS & COSD_FLAG_STROMVOLT) { |
72 | if (COSD_FLAGS_MODES & COSD_FLAG_STROMVOLT) { |
73 | write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 3, 0); |
73 | write_ndigit_number_u_10th(17, bottom_line - 1, s_volt, 3, 0); |
Line 74... | Line 74... | ||
74 | } |
74 | } |