mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-01 15:40:49 +00:00
PPR1 fix screen mirroring on LCD
This commit is contained in:
@@ -627,7 +627,8 @@ void Screen::setup()
|
||||
// is never found when probing i2c and therefore we don't call setup and never want to do (invalid) accesses to this device.
|
||||
useDisplay = true;
|
||||
|
||||
dispdev.resetOrientation();
|
||||
// I think this is not needed - redundant with ui.init
|
||||
// dispdev.resetOrientation();
|
||||
|
||||
// Initialising the UI will init the display too.
|
||||
ui.init();
|
||||
@@ -635,7 +636,12 @@ void Screen::setup()
|
||||
displayWidth = dispdev.width();
|
||||
displayHeight = dispdev.height();
|
||||
|
||||
ui.setTimePerTransition(300); // msecs
|
||||
uint16_t transitionTime = 300; // msecs
|
||||
#ifdef HAS_EINK
|
||||
transitionTime = 0;
|
||||
#endif
|
||||
ui.setTimePerTransition(transitionTime);
|
||||
|
||||
ui.setIndicatorPosition(BOTTOM);
|
||||
// Defines where the first frame is located in the bar.
|
||||
ui.setIndicatorDirection(LEFT_RIGHT);
|
||||
@@ -661,7 +667,9 @@ void Screen::setup()
|
||||
// Set up a log buffer with 3 lines, 32 chars each.
|
||||
dispdev.setLogBuffer(3, 32);
|
||||
|
||||
#ifdef FLIP_SCREEN_VERTICALLY
|
||||
#ifdef SCREEN_MIRROR
|
||||
dispdev.mirrorScreen();
|
||||
#elif defined(SCREEN_FLIP_VERTICALLY)
|
||||
dispdev.flipScreenVertically();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
#include "power.h"
|
||||
#include <string>
|
||||
|
||||
// 0 to 255, though particular variants might define different defaults
|
||||
#ifndef BRIGHTNESS_DEFAULT
|
||||
#define BRIGHTNESS_DEFAULT 150
|
||||
#endif
|
||||
|
||||
namespace graphics
|
||||
{
|
||||
|
||||
@@ -99,7 +104,7 @@ class Screen : public concurrency::OSThread
|
||||
|
||||
// Implementation to Adjust Brightness
|
||||
void adjustBrightness();
|
||||
uint8_t brightness = 150;
|
||||
uint8_t brightness = BRIGHTNESS_DEFAULT;
|
||||
|
||||
/// Starts showing the Bluetooth PIN screen.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user