From 42cd0bc58f0a0750a8f7f0b18fabb44d07b95d0b Mon Sep 17 00:00:00 2001
From: CaptainStouf <stouf@hardware-libre.org>
Date: Mon, 23 May 2016 03:47:49 +0200
Subject: [PATCH] Quick hack to set currentFrame at 0 when calling setFrames.
 Allows multilevel navigation.

Signed-off-by: CaptainStouf <stouf@hardware-libre.org>
---
 SSD1306Ui.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/SSD1306Ui.cpp b/SSD1306Ui.cpp
index 36b46aa..d6d7bda 100644
--- a/SSD1306Ui.cpp
+++ b/SSD1306Ui.cpp
@@ -96,6 +96,7 @@ void SSD1306Ui::setFrameAnimation(AnimationDirection dir) {
 void SSD1306Ui::setFrames(FrameCallback* frameFunctions, uint8_t frameCount) {
   this->frameCount     = frameCount;
   this->frameFunctions = frameFunctions;
+  this->state.currentFrame = 0;
 }
 
 // -/----- Overlays ------\-
-- 
GitLab