From cb7756d381df0cf930bd2fa0de0bdbb65447b03a Mon Sep 17 00:00:00 2001 From: discip <53649486+discip@users.noreply.github.com> Date: Wed, 19 Jan 2022 02:08:03 +0100 Subject: [PATCH] Update GUIThread.cpp --- source/Core/Threads/GUIThread.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index b452d5d0..295fef7a 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -831,7 +831,8 @@ void showWarnings() { #endif } -uint8_t idleScreenBGF[sizeof(idleScreenBG)]; +uint8_t buttonAF[sizeof(buttonA)]; +uint8_t buttonBF[sizeof(buttonB)]; uint8_t disconnectedTipF[sizeof(disconnectedTip)]; /* StartGUITask function */ void startGUITask(void const *argument) { @@ -851,12 +852,13 @@ void startGUITask(void const *argument) { // Generate the flipped screen into ram for later use // flipped is generated by flipping each row for (int row = 0; row < 2; row++) { - for (int x = 0; x < 84; x++) { - idleScreenBGF[(row * 84) + x] = idleScreenBG[(row * 84) + (83 - x)]; - } for (int x = 0; x < 41; x++) { + buttonAF[(row * 41) + x] = buttonA[(row * 41) + (40 - x)]; disconnectedTipF[(row * 41) + x] = disconnectedTip[(row * 41) + (40 - x)]; } + for (int x = 0; x < 43; x++) { + buttonBF[(row * 43) + x] = buttonB[(row * 43) + (42 - x)]; + } } } getTipRawTemp(1); // reset filter @@ -1033,12 +1035,13 @@ void startGUITask(void const *argument) { #else if (OLED::getRotation()) { #endif - OLED::drawArea(12, 0, 84, 16, idleScreenBG); + OLED::drawArea(55, 0, 41, 16, buttonA); + OLED::drawArea(12, 0, 43, 16, buttonB); OLED::setCursor(0, 0); gui_drawBatteryIcon(); } else { - OLED::drawArea(0, 0, 84, 16, idleScreenBGF); // Needs to be flipped so button ends up - // on right side of screen + OLED::drawArea(0, 0, 41, 16, buttonAF); // Needs to be flipped so button ends up + OLED::drawArea(41, 0, 43, 16, buttonBF); // on right side of screen OLED::setCursor(84, 0); gui_drawBatteryIcon(); }