From e54f2f4c0a6ed6a6b34ad99547ce7127d7fe2290 Mon Sep 17 00:00:00 2001 From: Richard Li Date: Wed, 14 Jul 2021 15:14:29 +0800 Subject: [PATCH] Fixed build problems after merging from 2.4 --- radio/src/gui/colorlcd/radio_diaganas.cpp | 2 +- radio/src/gui/colorlcd/view_text.cpp | 11 +++++++++-- radio/src/targets/nv14/libopenui_config.h | 1 - tools/build-gh.sh | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/radio/src/gui/colorlcd/radio_diaganas.cpp b/radio/src/gui/colorlcd/radio_diaganas.cpp index 939b113b2..9539bfb36 100644 --- a/radio/src/gui/colorlcd/radio_diaganas.cpp +++ b/radio/src/gui/colorlcd/radio_diaganas.cpp @@ -59,7 +59,7 @@ class RadioAnalogsDiagsWindow: public Window { dc->drawLine(touchState.x - 10, touchState.y - 8 - parent->top(), touchState.x + 10, touchState.y + 8 - parent->top(), SOLID, 0); dc->drawLine(touchState.x - 10, touchState.y + 8 - parent->top(), touchState.x + 10, touchState.y - 8- parent->top(), SOLID, 0); } -#if !defined(SIMU) +#if !defined(SIMU) && !defined(PCBNV14) constexpr coord_t y1 = MENU_CONTENT_TOP + 6 * FH; coord_t x1 = MENUS_MARGIN_LEFT; x1 = dc->drawText(x1, y1, "Touch GT911 FW ver:") + 8; diff --git a/radio/src/gui/colorlcd/view_text.cpp b/radio/src/gui/colorlcd/view_text.cpp index c3381508d..af2536453 100644 --- a/radio/src/gui/colorlcd/view_text.cpp +++ b/radio/src/gui/colorlcd/view_text.cpp @@ -96,12 +96,15 @@ void ViewTextWindow::checkEvents() coord_t deltaY; event_t event = getWindowEvent(); +#if defined(ROTARY_ENCODER_NAVIGATION) if (event == EVT_ROTARY_LEFT || event == EVT_ROTARY_RIGHT) { deltaY = ROTARY_ENCODER_SPEED() * step; } else { deltaY = step; } - +#else + deltaY = step; +#endif switch (event) { CASE_EVT_KEY_NEXT_LINE: currentPos += deltaY; @@ -259,12 +262,16 @@ void ViewTextWindow::checkEvents() coord_t deltaY; event_t event = getWindowEvent(); +#if defined(ROTARY_ENCODER_NAVIGATION) if (event == EVT_ROTARY_LEFT || event == EVT_ROTARY_RIGHT) { deltaY = ROTARY_ENCODER_SPEED() * step; } else { deltaY = step; } - +#else + deltaY = step; +#endif + int lineStep = deltaY / step; if(lineStep > (maxScreenLines >> 1)) lineStep = maxScreenLines >> 1; /* diff --git a/radio/src/targets/nv14/libopenui_config.h b/radio/src/targets/nv14/libopenui_config.h index 502856879..0a00fe51b 100644 --- a/radio/src/targets/nv14/libopenui_config.h +++ b/radio/src/targets/nv14/libopenui_config.h @@ -177,4 +177,3 @@ constexpr LcdFlags TABLE_BODY_FONT = FONT(STD); constexpr int CJK_FIRST_LETTER_INDEX = 128 - 32 + 21; constexpr coord_t CHAR_SPACING = 0; -#define ROTARY_ENCODER_SPEED() rotencSpeed diff --git a/tools/build-gh.sh b/tools/build-gh.sh index 457742b97..78e71f6f2 100755 --- a/tools/build-gh.sh +++ b/tools/build-gh.sh @@ -122,7 +122,7 @@ case $FLAVOR in BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON" ;; T16_FS) - BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DFLYSKY_HALL_STICKS=ON" + BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON -DFLYSKY_HALL_STICKS=ON" ;; T18) BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18"