From c8157a828a5da8b3a9e930ef29366d6790d28eba Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 10 Apr 2023 06:08:12 +0300 Subject: [PATCH] Sleep between frames to have a constant frame rate --- KThread.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/KThread.cpp b/KThread.cpp index 1365149..3e37cb1 100644 --- a/KThread.cpp +++ b/KThread.cpp @@ -229,6 +229,7 @@ void BootLogoAnimationThread() free(img); Display->SetBuffer(1); + TaskManager->Sleep(50); } int brightness = 100; @@ -237,6 +238,7 @@ void BootLogoAnimationThread() brightness -= 10; Display->SetBrightness(brightness, 1); Display->SetBuffer(1); + TaskManager->Sleep(10); } } @@ -284,6 +286,7 @@ void ExitLogoAnimationThread() free(img); Display->SetBuffer(1); + TaskManager->Sleep(50); } int brightness = 100; @@ -292,6 +295,7 @@ void ExitLogoAnimationThread() brightness -= 10; Display->SetBrightness(brightness, 1); Display->SetBuffer(1); + TaskManager->Sleep(10); } }