From 7126cd0511f107d6812677299fef81ddc2f31578 Mon Sep 17 00:00:00 2001
From: Fabrice Weinberg <Fabrice@weinberg.me>
Date: Thu, 5 Jan 2017 13:53:53 +0100
Subject: [PATCH] Implement setLoadingDrawFunction. Fixes #102

---
 OLEDDisplayUi.cpp | 4 ++++
 README.md         | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/OLEDDisplayUi.cpp b/OLEDDisplayUi.cpp
index e787442..0e23947 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;
diff --git a/README.md b/README.md
index a63d4ba..c7daf52 100644
--- a/README.md
+++ b/README.md
@@ -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
-- 
GitLab