Skip to content
This repository was archived by the owner on Oct 28, 2023. It is now read-only.

Commit d24e2d9

Browse files
authored
Merge pull request SHA2017-badge#223 from SHA2017-badge/basvs-alternative-splash-recovery
when the splash screen doesn't start, revert to default splash screen.
2 parents 40a3849 + d033ba2 commit d24e2d9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

esp32/modules/boot.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
splash = 'splash'
1515
else:
1616
splash = badge.nvs_get_str('boot','splash','splash')
17+
1718
if machine.reset_cause() != machine.DEEPSLEEP_RESET:
1819
print('[BOOT] Cold boot')
1920
else:
@@ -23,13 +24,19 @@
2324
splash = load_me
2425
print("starting %s" % load_me)
2526
esp.rtcmem_write_string("")
27+
2628
try:
2729
if not splash=="shell":
2830
__import__(splash)
2931
else:
3032
ugfx.clear(ugfx.WHITE)
3133
ugfx.flush(ugfx.LUT_FULL)
3234
except BaseException as e:
35+
# if we started the splash screen and it is not the default splash screen,
36+
# then revert to original splash screen.
37+
if splash == badge.nvs_get_str('boot', 'splash', 'splash') and splash != 'splash':
38+
badge.nvs_erase_key('boot', 'splash')
39+
3340
sys.print_exception(e)
3441
import easydraw
3542
easydraw.msg("A fatal error occured!","Still Crashing Anyway", True)

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