From f715f77848c44f0ea1c62cece461f0c3bbbbf7d1 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 6 Feb 2022 15:56:41 +1100 Subject: [PATCH] fix oled layout _again_ --- source/Core/Drivers/usb-pd | 2 +- source/Core/Threads/GUIThread.cpp | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/source/Core/Drivers/usb-pd b/source/Core/Drivers/usb-pd index 4c5a5625..b3859826 160000 --- a/source/Core/Drivers/usb-pd +++ b/source/Core/Drivers/usb-pd @@ -1 +1 @@ -Subproject commit 4c5a5625bab7191b77147e1ef1bd6e2705f9e640 +Subproject commit b38598261df4f705bcbd37cdd5dcccfaa5ab7b4a diff --git a/source/Core/Threads/GUIThread.cpp b/source/Core/Threads/GUIThread.cpp index 940cde55..bb6ca51f 100644 --- a/source/Core/Threads/GUIThread.cpp +++ b/source/Core/Threads/GUIThread.cpp @@ -539,15 +539,16 @@ static void gui_solderingMode(uint8_t jumpToSleep) { } } // else we update the screen information - if (OLED::getRotation()) { - OLED::setCursor(50, 0); - } else { - OLED::setCursor(-1, 0); - } + OLED::clearScreen(); - OLED::setCursor(0, 0); + // Draw in the screen details if (getSettingValue(SettingsOptions::DetailedSoldering)) { + if (OLED::getRotation()) { + OLED::setCursor(50, 0); + } else { + OLED::setCursor(-1, 0); + } gui_drawTipTemp(true, FontStyle::LARGE); #ifndef NO_SLEEP_MODE @@ -588,6 +589,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) { printVoltage(); OLED::print(SymbolVolts, FontStyle::SMALL); } else { + OLED::setCursor(0, 0); // We switch the layout direction depending on the orientation of the oled if (OLED::getRotation()) { // battery