From 1080514bd9b1774037699782910085a369dc7527 Mon Sep 17 00:00:00 2001 From: bsongis Date: Fri, 2 Nov 2012 16:17:13 +0000 Subject: [PATCH] [all] Telemetry display bug fixes --- src/frsky.cpp | 2 +- src/model_menus.cpp | 8 ++++++-- src/open9x.cpp | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/frsky.cpp b/src/frsky.cpp index 2cc679f9f..95572fefa 100644 --- a/src/frsky.cpp +++ b/src/frsky.cpp @@ -953,7 +953,7 @@ int16_t convertTelemValue(uint8_t channel, uint8_t value) case TELEM_GPSALT: case TELEM_MAX_ALT: case TELEM_MIN_ALT: - result = value * 4; + result = value * 8 - 500; break; case TELEM_RPM: case TELEM_MAX_RPM: diff --git a/src/model_menus.cpp b/src/model_menus.cpp index 1f2801c99..af5e0c59d 100644 --- a/src/model_menus.cpp +++ b/src/model_menus.cpp @@ -2024,9 +2024,11 @@ void menuModelExpoMix(uint8_t expo, uint8_t _event) #if defined(PCBSKY9X) if (ed->name[0]) { putsSwitches(11*FW, y, ed->swtch, 0); - lcd_putsnAtt(15*FW+2, y, ed->name, sizeof(ed->name), ZCHAR | (isExpoActive(i) ? BOLD : 0)); + lcd_putsnAtt(DISPLAY_W-sizeof(ed->name)*FW-MENUS_SCROLLBAR_WIDTH, y, ed->name, sizeof(ed->name), ZCHAR | (isExpoActive(i) ? BOLD : 0)); } +#if !defined(PCBX9D) else +#endif #endif { putsSwitches(EXPO_LINE_SWITCH_POS, y, ed->swtch, 0); // normal switches @@ -2043,9 +2045,11 @@ void menuModelExpoMix(uint8_t expo, uint8_t _event) #if defined(PCBSKY9X) if (md->name[0]) { - lcd_putsnAtt(15*FW+2, y, md->name, sizeof(md->name), ZCHAR | (isMixActive(i) ? BOLD : 0)); + lcd_putsnAtt(DISPLAY_W-sizeof(md->name)*FW-MENUS_SCROLLBAR_WIDTH, y, md->name, sizeof(md->name), ZCHAR | (isMixActive(i) ? BOLD : 0)); } +#if !defined(PCBX9D) else +#endif #endif { if (md->curveParam) { diff --git a/src/open9x.cpp b/src/open9x.cpp index 30a830231..f8bd2bf89 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -1002,6 +1002,9 @@ void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t if (unit == UNIT_FEET) { unit = UNIT_METERS; } + if (unit == UNIT_KTS) { + unit = UNIT_KMH; + } #else if (unit == UNIT_KTS) { // kts to km/h