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

Commit b617e53

Browse files
committed
Flexible boot.py
1 parent 68a67cb commit b617e53

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

esp32/modules/_boot.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
try:
44
uos.mount(uos.VfsNative(True), '/')
55
open("/boot.py", "r")
6-
76
except OSError:
87
import inisetup
98
vfs = inisetup.setup()

esp32/modules/inisetup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@ def setup():
1111
ugfx.init()
1212
esp.rtcmem_write(0,0)
1313
esp.rtcmem_write(1,0)
14+
splash = badge.nvs_get_str('badge','boot.splash','splash')
1415
if machine.reset_cause() != machine.DEEPSLEEP_RESET:
15-
print("cold boot")
16-
import splash
16+
print('[BOOT.PY] Cold boot')
1717
else:
18-
print("wake from sleep")
18+
print("[BOOT.PY] Wake from sleep")
1919
load_me = esp.rtcmem_read_string()
20-
if load_me != "":
20+
if load_me:
21+
splash = load_me
2122
print("starting %s" % load_me)
2223
esp.rtcmem_write_string("")
23-
__import__(load_me)
24-
else:
25-
import splash
24+
__import__(splash)
2625
""")
2726
return vfs

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