[WelcomeScreen.py] Added waiting in the fade out animation (missed that in an earlier commit)

Also improved memory usage a little bit by import the sleep method only, not the whole time library
This commit is contained in:
BlueFox 2024-10-28 19:12:07 +00:00
parent 1614247f0d
commit 18d25df898

View File

@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import time
from time import sleep
class WelcomeScreen:
@ -100,7 +100,7 @@ class WelcomeScreen:
self.lcd.move_to(0,y_offset)
self.lcd.putstr(self.started_msg.center(16))
time.sleep(wait_after_cycles)
sleep(wait_after_cycles)
# now fade down if enabled via the params
if fade_down["enabled"]:
@ -122,4 +122,5 @@ class WelcomeScreen:
old_display = old_display[:-self.columns]
lines_before = " " * (self.columns*self.lines-len(old_display))
self.lcd.putstr(lines_before + old_display)
sleep(wait_between)
sleep(wait_after)