kopia lustrzana https://github.com/meshtastic/firmware
screen.cpp: flip the display 180
rodzic
3886665041
commit
3e44c2c3e1
|
@ -78,6 +78,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#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 <http://www.gnu.org/licenses/>.
|
|||
// 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
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue