Skip to content

Commit 64951c5

Browse files
committed
reverting 41e50eb
It causes crashes..
1 parent 41e50eb commit 64951c5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

esp32/modules/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def store_settings(nickname):
1111

1212
def is_developer(nickname):
1313
if (nickname==""):
14-
badge.nvs_set_u8('badge', 'setup.state', 2) # Skip the sponsors
14+
badge.nvs_set_str('badge', 'setup.state', '2') # Skip the sponsors
1515
return True
1616
return False
1717

@@ -20,11 +20,11 @@ def action_home(pressed):
2020
appglue.start_app("")
2121

2222
def set_setup_state():
23-
s_old = badge.nvs_get_u8('badge', 'setup.state', 0)
23+
s_old = int(badge.nvs_get_str('badge', 'setup.state', '0'))
2424
s_new = 2
2525
if (s_old==0):
2626
s_new = 1
27-
badge.nvs_set_u8('badge', 'setup.state', s_new)
27+
badge.nvs_set_str('badge', 'setup.state', str(s_new))
2828

2929
def draw_setup_completed():
3030
ugfx.clear(ugfx.WHITE)

esp32/modules/splash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,13 +421,13 @@ def check_ota_available():
421421

422422
# WELCOME (SETUP, SPONSORS OR CLOCK)
423423
def welcome():
424-
setupcompleted = badge.nvs_get_u8('badge', 'setup.state', 0)
424+
setupcompleted = int(badge.nvs_get_str('badge', 'setup.state', '0'))
425425
if (setupcompleted==0): # First boot (open setup)
426426
print("[SPLASH] Setup not completed. Running setup!")
427427
appglue.start_app("setup")
428428
elif (setupcompleted==1): # Second boot (after setup)
429429
print("[SPLASH] Showing sponsors once...")
430-
badge.nvs_set_u8('badge', 'setup.state', 2) # Only force show sponsors once
430+
badge.nvs_set_str('badge', 'setup.state', '2') # Only force show sponsors once
431431
appglue.start_app("sponsors")
432432
else: # Setup completed
433433
print("[SPLASH] Normal boot.")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy