diff --git a/OLEDDisplay.h b/OLEDDisplay.h index 74bdba1c2e786e0e886ab7c41c66ea3fc6ef5837..b46e7edcc828156d3ff28a24f2c4828a19cb1cd1 100644 --- a/OLEDDisplay.h +++ b/OLEDDisplay.h @@ -211,7 +211,7 @@ class OLEDDisplay : public Print { void flipScreenVertically(); // Write the buffer to the display memory - virtual void display(void); + virtual void display(void) = 0; // Clear the local pixel buffer void clear(void); @@ -251,10 +251,10 @@ class OLEDDisplay : public Print { char *logBuffer = NULL; // Send a command to the display (low level function) - virtual void sendCommand(uint8_t com); + virtual void sendCommand(uint8_t com) {}; // Connect to the display - virtual bool connect(); + virtual bool connect() {}; // Send all the init commands void sendInitCommands(); diff --git a/OLEDDisplayUi.cpp b/OLEDDisplayUi.cpp index e78744299f6dbd0f6ef7155d6cef43208a0aa886..3fb4326a4d6ead0584b61e2d6187b1e8b3241575 100644 --- a/OLEDDisplayUi.cpp +++ b/OLEDDisplayUi.cpp @@ -116,6 +116,10 @@ void OLEDDisplayUi::setOverlays(OverlayCallback* overlayFunctions, uint8_t overl // -/----- Loading Process -----\- +void OLEDDisplayUi::setLoadingDrawFunction(LoadingDrawFunction loadingDrawFunction) { + this->loadingDrawFunction = loadingDrawFunction; +} + void OLEDDisplayUi::runLoadingProcess(LoadingStage* stages, uint8_t stagesCount) { uint8_t progress = 0; uint8_t increment = 100 / stagesCount; @@ -372,11 +376,11 @@ void OLEDDisplayUi::drawIndicator() { break; case RIGHT: x = 120 + (8 * indicatorFadeProgress); - y = 32 - frameStartPos + 12 * i; + y = 32 - frameStartPos + 2 + 12 * i; break; case LEFT: x = 0 - (8 * indicatorFadeProgress); - y = 32 - frameStartPos + 12 * i; + y = 32 - frameStartPos + 2 + 12 * i; break; } diff --git a/README.md b/README.md index a63d4ba8927a44ce6c8cefc3c36da7584791e66b..01c134c3506041cdd547a76b78b673f1d2659b49 100644 --- a/README.md +++ b/README.md @@ -274,14 +274,14 @@ void enableIndicator(); void disableIndicator(); /** - * Enable drawing of indicators + * Enable drawing of all indicators. */ -void enableAllIndicator(); +void enableAllIndicators(); /** - * Disable drawing of indicators. + * Disable drawing of all indicators. */ -void disableAllIndicator(); +void disableAllIndicators(); /** * Set the position of the indicator bar. @@ -322,7 +322,7 @@ void setOverlays(OverlayCallback* overlayFunctions, uint8_t overlayCount); * Set the function that will draw each step * in the loading animation */ -void setLoadingDrawFunction(LoadingDrawFunction stage); +void setLoadingDrawFunction(LoadingDrawFunction loadingDrawFunction); /** * Run the loading process diff --git a/library.json b/library.json index 7001fba8d1666bc8cfc448f85e24c89c7359cc03..25ca1ac7baf68019b00848004710f60e68a49192 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "ESP8266_SSD1306", - "version": "3.2.3", + "version": "3.2.4", "keywords": "ssd1306, oled, display, i2c", "description": "A I2C display driver for SSD1306 oled displays connected to an ESP8266", "repository": diff --git a/library.properties b/library.properties index 81174d5956da5963dce585b6c5239165dc18ab92..23556a5e256059d3c234b4069f0ec72fafbaa9d9 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESP8266 Oled Driver for SSD1306 display -version=3.2.3 +version=3.2.4 author=Daniel Eichhorn, Fabrice Weinberg maintainer=Daniel Eichhorn <squix78@gmail.com> sentence=A I2C display driver for SSD1306 oled displays connected to an ESP8266