We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2511bc commit 3a04238Copy full SHA for 3a04238
m5stack/modules/startup/__init__.py
@@ -54,13 +54,19 @@ def startup(boot_opt, timeout: int = 60) -> None:
54
# FIXME: remove this file is temporary solution
55
os.remove("/flash/main.py")
56
57
- # Special operations for some devices
58
board_id = M5.getBoard()
+ # Special operations for some devices
59
if board_id == M5.BOARD.M5StickCPlus2:
60
from machine import Pin
61
62
pin4 = Pin(4, Pin.OUT)
63
pin4.value(1)
64
+ if board_id == M5.BOARD.M5AtomS3U:
65
+ # M5AtomS3U may fail to enter the AUTODETECT process, which will cause
66
+ # m5things to fail to obtain the board id.
67
+ nvs = esp32.NVS("M5GFX")
68
+ nvs.set_u32("AUTODETECT", board_id)
69
+ nvs.commit()
70
71
# Do nothing
72
if boot_opt is BOOT_OPT_NOTHING:
0 commit comments