Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0f8a455

Browse files
About app: add more info about partitions
1 parent8488097 commit0f8a455

File tree

1 file changed

+12
-1
lines changed
  • internal_filesystem/builtin/apps/com.micropythonos.about/assets

1 file changed

+12
-1
lines changed

‎internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def onCreate(self):
2222
label4.set_text(f"sys.platform:{sys.platform}")
2323
try:
2424
print("Trying to find out additional board info, not available on every platform...")
25-
importmachine
2625
label5=lv.label(screen)
2726
label5.set_text("")# otherwise it will show the default "Text" if there's an exception below
27+
importmachine
2828
label5.set_text(f"machine.freq:{machine.freq()}")
2929
label6=lv.label(screen)
3030
label6.set_text(f"machine.unique_id():{machine.unique_id()}")
@@ -34,4 +34,15 @@ def onCreate(self):
3434
label8.set_text(f"machine.reset_cause():{machine.reset_cause()}")
3535
exceptExceptionase:
3636
print(f"Additional board info got exception:{e}")
37+
try:
38+
label9=lv.label(screen)
39+
label9.set_text("")# otherwise it will show the default "Text" if there's an exception below
40+
fromesp32importPartition
41+
current=Partition(Partition.RUNNING)
42+
label9.set_text(f"Partition.RUNNING:{current}")
43+
next_partition=current.get_next_update()
44+
label10=lv.label(screen)
45+
label10.set_text(f"Next update partition:{next_partition}")
46+
exceptExceptionase:
47+
print(f"Partition info got exception:{e}")
3748
self.setContentView(screen)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp