From 5a18647cd411e1f7551351654eedd9dc4581b907 Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Thu, 13 Apr 2023 14:40:57 +1000 Subject: [PATCH] fix(X9lite): Chan. monitor, other display glitches (#3452) It seems the display used on these TX doesn't like too many horizontal lines. --- radio/src/gui/128x64/model_failsafe.cpp | 2 +- radio/src/gui/128x64/widgets.cpp | 2 +- radio/src/gui/common/stdlcd/model_receiver_options.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/radio/src/gui/128x64/model_failsafe.cpp b/radio/src/gui/128x64/model_failsafe.cpp index abb210a3e..20e00c190 100644 --- a/radio/src/gui/128x64/model_failsafe.cpp +++ b/radio/src/gui/128x64/model_failsafe.cpp @@ -112,7 +112,7 @@ void menuModelFailsafe(event_t event) } // Gauge -#if !defined(PCBX7) // X7 LCD doesn't like too many horizontal lines +#if !(defined(PCBX7) || defined(PCBX9LITE) || defined(PCBX9LITES)) // X7/X9 LCD doesn't like too many horizontal lines lcdDrawRect(x+LCD_W-3-wbar, y, wbar+1, 6); #endif const uint8_t lenChannel = limit(1, (abs(channelValue) * wbar/2 + lim/2) / lim, wbar/2); diff --git a/radio/src/gui/128x64/widgets.cpp b/radio/src/gui/128x64/widgets.cpp index 663ca73f5..3025c1198 100644 --- a/radio/src/gui/128x64/widgets.cpp +++ b/radio/src/gui/128x64/widgets.cpp @@ -68,7 +68,7 @@ void drawVerticalScrollbar(coord_t x, coord_t y, coord_t h, uint16_t offset, uin void drawGauge(coord_t x, coord_t y, coord_t w, coord_t h, int32_t val, int32_t max) { -#if defined(PCBX7) || defined(PCBX9LITES) // X7 LCD doesn't like too many horizontal lines +#if defined(PCBX7) || defined(PCBX9LITE) || defined(PCBX9LITES) // X7/X9 LCD doesn't like too many horizontal lines h++; #else lcdDrawRect(x, y, w+1, h); diff --git a/radio/src/gui/common/stdlcd/model_receiver_options.cpp b/radio/src/gui/common/stdlcd/model_receiver_options.cpp index 0031d85db..dba24e2bb 100644 --- a/radio/src/gui/common/stdlcd/model_receiver_options.cpp +++ b/radio/src/gui/common/stdlcd/model_receiver_options.cpp @@ -238,7 +238,7 @@ void menuModelReceiverOptions(event_t event) // Bargraph if (channel <= channelMax) { int32_t channelValue = channelOutputs[channel]; - #if !defined(PCBX7) // X7 LCD doesn't like too many horizontal lines + #if !(defined(PCBX7) || defined(PCBX9LITE) || defined(PCBX9LITES)) // X7/X9 LCD doesn't like too many horizontal lines lcdDrawRect(RECEIVER_OPTIONS_2ND_COLUMN, y + 2, wbar + 1, 4); #endif auto lenChannel = limit(1, (abs(channelValue) * wbar / 2 + lim / 2) / lim, wbar / 2);