From 93cc278eee2c4b795b3c714648cf034255ce274d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Tue, 4 Oct 2022 09:47:54 +0200 Subject: [PATCH] implement #1406 --- src/configuration.h | 4 ---- src/graphics/Screen.cpp | 8 ++++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/configuration.h b/src/configuration.h index f7d42afc..d91a674c 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -94,10 +94,6 @@ along with this program. If not, see . // Define this if you know you have that controller or your "SSD1306" misbehaves. //#define USE_SH1106 -// Flip the screen upside down by default as it makes more sense on T-BEAM -// devices. Comment this out to not rotate screen 180 degrees. -#define SCREEN_FLIP_VERTICALLY - // Define if screen should be mirrored left to right // #define SCREEN_MIRROR diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index f7783fc0..184f3eec 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -947,8 +947,12 @@ void Screen::setup() #ifdef SCREEN_MIRROR dispdev.mirrorScreen(); -#elif defined(SCREEN_FLIP_VERTICALLY) - dispdev.flipScreenVertically(); +#else + // Standard behaviour is to FLIP the screen (needed on T-Beam). If this config item is set, unflip it, and thereby logically flip it. + // If you have a headache now, you're welcome. + if (!config.display.flip_screen) { + dispdev.flipScreenVertically(); + } #endif // Get our hardware ID