Rev 736 | Rev 757 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 736 | Rev 753 | ||
---|---|---|---|
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)) |
26 | #if !(ALLCHARSDEBUG|(WRITECHARS != -1)) |
- | 27 | ||
- | 28 | int osd_ncmode_default() { |
|
27 | 29 | uint8_t rc_signal = naviData.RC_RSSI?naviData.RC_RSSI:naviData.RC_Quality; // if RSSI is present use it, else use Qality |
|
28 | int osd_ncmode_default() { |
30 | |
29 | if (COSD_FLAGS_MODES & COSD_FLAG_HUD) { |
31 | if (COSD_FLAGS_MODES & COSD_FLAG_HUD) { |
30 | // write icons at init or after menu/mode-switch |
32 | // write icons at init or after menu/mode-switch |
31 | if (!(COSD_FLAGS_RUNTIME & COSD_ICONS_WRITTEN)) { |
33 | if (!(COSD_FLAGS_RUNTIME & COSD_ICONS_WRITTEN)) { |
Line 52... | Line 54... | ||
52 | } |
54 | } |
Line 53... | Line 55... | ||
53 | 55 | ||
54 | // first line |
56 | // first line |
Line 55... | Line 57... | ||
55 | write_ndigit_number_u(2, top_line, (uint16_t) (((uint32_t) naviData.GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 3, 0); |
57 | write_ndigit_number_u(2, top_line, (uint16_t) (((uint32_t) naviData.GroundSpeed * (uint32_t) 9) / (uint32_t) 250), 3, 0); |
56 | 58 | ||
57 | write_ndigit_number_u(7, top_line, naviData.RC_Quality, 3, 0); |
59 | write_ndigit_number_u(7, top_line, rc_signal, 3, 0); |
58 | if (naviData.RC_Quality <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) { |
60 | if (rc_signal <= RCLVL_WRN && last_RC_Quality > RCLVL_WRN) { |
59 | for (uint8_t x = 0; x < 4; x++) |
61 | for (uint8_t x = 0; x < 4; x++) |
60 | write_char_att_xy(7 + x, top_line, BLINK); |
62 | write_char_att_xy(7 + x, top_line, BLINK); |
61 | } else if (naviData.RC_Quality > RCLVL_WRN && last_RC_Quality <= RCLVL_WRN) { |
63 | } else if (rc_signal > RCLVL_WRN && last_RC_Quality <= RCLVL_WRN) { |
62 | for (uint8_t x = 0; x < 4; x++) |
64 | for (uint8_t x = 0; x < 4; x++) |
Line 248... | Line 250... | ||
248 | } else if (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT) { |
250 | } else if (COSD_FLAGS_MODES & COSD_FLAG_FCCURRENT) { |
249 | if (naviData.Current * 10 > max_ampere) max_ampere = naviData.Current * 10; |
251 | if (naviData.Current * 10 > max_ampere) max_ampere = naviData.Current * 10; |
250 | } |
252 | } |
Line 251... | Line 253... | ||
251 | } |
253 | } |
252 | 254 | ||
253 | // remember last values |
255 | // remember last values |
254 | last_RC_Quality = naviData.RC_Quality; |
256 | last_RC_Quality = rc_signal; |
255 | last_UBat = naviData.UBat; |
257 | last_UBat = naviData.UBat; |
Line 256... | Line 258... | ||
256 | old_MKFlags = naviData.FCFlags; |
258 | old_MKFlags = naviData.FCFlags; |