Rev 932 | Rev 1197 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 932 | Rev 941 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | #include "osd_ncmode_default.h" |
24 | #include "osd_ncmode_default.h" |
Line 25... | Line 25... | ||
25 | 25 | ||
Line 26... | Line 26... | ||
26 | #if (!(ALLCHARSDEBUG || (WRITECHARS != -1)) && !FCONLY) |
26 | #if (!(ALLCHARSDEBUG || (WRITECHARS != -1)) && !FCONLY) |
27 | - | ||
28 | int osd_ncmode_default() { |
- | |
29 | uint8_t rc_signal = naviData.RC_RSSI ? naviData.RC_RSSI : naviData.RC_Quality; // if RSSI is present use it, else use Qality |
27 | |
30 | 28 | int osd_ncmode_default() { |
|
31 | if (COSD_FLAGS_MODES & COSD_FLAG_HUD) { |
29 | if (COSD_FLAGS_MODES & COSD_FLAG_HUD) { |
32 | // write icons at init or after menu/mode-switch |
30 | // write icons at init or after menu/mode-switch |
33 | if (!(COSD_FLAGS_RUNTIME & COSD_ICONS_WRITTEN)) { |
31 | if (!(COSD_FLAGS_RUNTIME & COSD_ICONS_WRITTEN)) { |
Line 39... | Line 37... | ||
39 | write_char_xy(5, top_line, 0xCB); // km/h |
37 | write_char_xy(5, top_line, 0xCB); // km/h |
40 | write_char_xy(27, top_line + 1, 0xCC); // small meters m home |
38 | write_char_xy(27, top_line + 1, 0xCC); // small meters m home |
41 | write_char_xy(27, top_line, 0xCC); // small meters m height |
39 | write_char_xy(27, top_line, 0xCC); // small meters m height |
42 | } |
40 | } |
Line 43... | Line -... | ||
43 | - | ||
44 | write_char_xy(10, top_line, 0xCA); // RC-transmitter |
41 | |
Line 45... | Line 42... | ||
45 | write_char_xy(16, top_line, 0xD0); // degree symbol |
42 | write_char_xy(16, top_line, 0xD0); // degree symbol |
46 | 43 | ||
Line 47... | Line -... | ||
47 | write_char_xy(20, top_line + 1, 0xB0); // left circle |
- | |
48 | write_char_xy(22, top_line + 1, 0xB2); // right circle |
44 | write_char_xy(20, top_line + 1, 0xB0); // left circle |
49 | 45 | write_char_xy(22, top_line + 1, 0xB2); // right circle |
|
50 | 46 | ||
51 | write_char_xy(7, bottom_line, 0x9E); // small V |
47 | write_char_xy(7, bottom_line, 0x9E); // small V |
52 | if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) || (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT)) { |
48 | if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) || (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT)) { |
Line 77... | Line 73... | ||
77 | 73 | ||
78 | draw_big_variometer(2, 8, (uint16_t)((uint32_t)naviData.GroundSpeed / (uint32_t)125)); |
74 | draw_big_variometer(2, 8, (uint16_t)((uint32_t)naviData.GroundSpeed / (uint32_t)125)); |
79 | } |
75 | } |
Line 80... | Line 76... | ||
80 | } |
76 | } |
81 | 77 | ||
82 | write_ndigit_number_u(7, top_line, rc_signal, 3, 0); |
78 | write_ndigit_number_u(7, top_line, naviData.RC_Quality, 3, 0); |
83 | if (rc_signal <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) { |
79 | if (naviData.RC_Quality <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) { |
84 | for (uint8_t x = 0; x < 4; x++) |
80 | for (uint8_t x = 0; x < 4; x++) |
85 | write_char_att_xy(7 + x, top_line, BLINK); |
81 | write_char_att_xy(7 + x, top_line, BLINK); |
86 | } else if (rc_signal > RCLVL_WRN && last_RC_Quality <= RCLVL_WRN) { |
82 | } else if (naviData.RC_Quality > RCLVL_WRN && last_RC_Quality <= RCLVL_WRN) { |
87 | for (uint8_t x = 0; x < 4; x++) |
83 | for (uint8_t x = 0; x < 4; x++) |
Line -... | Line 84... | ||
- | 84 | write_char_att_xy(7 + x, top_line, 0); |
|
- | 85 | } |
|
- | 86 | ||
- | 87 | if (naviData.FCStatusFlags2 & FC_STATUS2_CAREFREE) { |
|
- | 88 | write_char_xy(10, top_line, 0x8F); // smiling CF transmitter |
|
- | 89 | } else { |
|
Line 88... | Line 90... | ||
88 | write_char_att_xy(7 + x, top_line, 0); |
90 | write_char_xy(10, top_line, 0xCA); // RC-transmitter |
89 | } |
91 | } |
90 | 92 | ||
91 | 93 | ||
Line 301... | Line 303... | ||
301 | if (naviData.Current * 10 > max_ampere) max_ampere = naviData.Current * 10; |
303 | if (naviData.Current * 10 > max_ampere) max_ampere = naviData.Current * 10; |
302 | } |
304 | } |
303 | } |
305 | } |
Line 304... | Line 306... | ||
304 | 306 | ||
305 | // remember last values |
307 | // remember last values |
306 | last_RC_Quality = rc_signal; |
308 | last_RC_Quality = naviData.RC_Quality; |
307 | last_UBat = naviData.UBat; |
309 | last_UBat = naviData.UBat; |
308 | old_MKFlags = naviData.FCFlags; |
310 | old_MKFlags = naviData.FCFlags; |
309 | old_NCFlags = naviData.NCFlags; |
311 | old_NCFlags = naviData.NCFlags; |