diff --git a/src/configuration.h b/src/configuration.h index 1425aee1..00b04fcf 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -78,6 +78,10 @@ along with this program. If not, see . #define SSD1306_ADDRESS 0x3C +// 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 FLIP_SCREEN_VERTICALLY + // ----------------------------------------------------------------------------- // GPS // ----------------------------------------------------------------------------- @@ -105,8 +109,6 @@ along with this program. If not, see . // This string must exactly match the case used in release file names or the android updater won't work #define HW_VENDOR "TBEAM" -#define BICOLOR_DISPLAY // we have yellow at the top 16 lines - // #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep #define I2C_SDA 21 diff --git a/src/screen.cpp b/src/screen.cpp index a866a9b8..69e16419 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -453,12 +453,7 @@ void Screen::setup() if (!useDisplay) return; -// TODO(girts): how many of the devices come with the bicolor displays? With -// this enabled, the logo looklooks nice, but the regular screens look a bit -// wacky as the text crosses the color boundary and there's a 1px gap. -#ifdef BICOLOR_DISPLAY - dispdev.flipScreenVertically(); // looks better without this on lora32 -#endif + dispdev.resetOrientation(); // Initialising the UI will init the display too. ui.init(); @@ -483,7 +478,11 @@ void Screen::setup() // Set up a log buffer with 3 lines, 32 chars each. dispdev.setLogBuffer(3, 32); - // Turn on the display hardware. +#ifdef FLIP_SCREEN_VERTICALLY + dispdev.flipScreenVertically(); +#endif + + // Turn on the display. handleSetOn(true); // On some ssd1306 clones, the first draw command is discarded, so draw it