File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ def store_settings(nickname):
11
11
12
12
def is_developer (nickname ):
13
13
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
15
15
return True
16
16
return False
17
17
@@ -20,11 +20,11 @@ def action_home(pressed):
20
20
appglue .start_app ("" )
21
21
22
22
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' ) )
24
24
s_new = 2
25
25
if (s_old == 0 ):
26
26
s_new = 1
27
- badge .nvs_set_u8 ('badge' , 'setup.state' , s_new )
27
+ badge .nvs_set_str ('badge' , 'setup.state' , str ( s_new ) )
28
28
29
29
def draw_setup_completed ():
30
30
ugfx .clear (ugfx .WHITE )
Original file line number Diff line number Diff line change @@ -421,13 +421,13 @@ def check_ota_available():
421
421
422
422
# WELCOME (SETUP, SPONSORS OR CLOCK)
423
423
def welcome ():
424
- setupcompleted = badge .nvs_get_u8 ('badge' , 'setup.state' , 0 )
424
+ setupcompleted = int ( badge .nvs_get_str ('badge' , 'setup.state' , '0' ) )
425
425
if (setupcompleted == 0 ): # First boot (open setup)
426
426
print ("[SPLASH] Setup not completed. Running setup!" )
427
427
appglue .start_app ("setup" )
428
428
elif (setupcompleted == 1 ): # Second boot (after setup)
429
429
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
431
431
appglue .start_app ("sponsors" )
432
432
else : # Setup completed
433
433
print ("[SPLASH] Normal boot." )
You can’t perform that action at this time.
0 commit comments