Display: Add property to enable or disable the screensaver
This commit is contained in:
parent
d1483468c6
commit
f7fb9a2bd6
@ -19,6 +19,7 @@ public:
|
||||
void loop();
|
||||
|
||||
bool enablePowerSafe = true;
|
||||
bool enableScreensaver = true;
|
||||
bool showLogo = true;
|
||||
uint8_t contrast = 60;
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ void DisplayGraphicClass::printText(const char* text, uint8_t line)
|
||||
uint16_t maxHeight = _display->getHeight();
|
||||
|
||||
// pxMovement +x (0 - 6 px)
|
||||
uint8_t ex = (_mExtra % 7);
|
||||
uint8_t ex = enableScreensaver ? (_mExtra % 7) : 0;
|
||||
|
||||
// set the font size based on the display size
|
||||
switch (line) {
|
||||
@ -138,7 +138,7 @@ void DisplayGraphicClass::loop()
|
||||
|
||||
//=====> Logo and Lighting ==========
|
||||
// pxMovement +x (0 - 6 px)
|
||||
uint8_t ex = (_mExtra % 7);
|
||||
uint8_t ex = enableScreensaver ? (_mExtra % 7) : 0;
|
||||
if (isprod > 0) {
|
||||
_display->drawXBMP(5 + ex, 1, 8, 17, bmp_arrow);
|
||||
if (showLogo) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user