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

Commit9cb0b90

Browse files
About app: reorder
1 parent313b909 commit9cb0b90

File tree

1 file changed

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

1 file changed

+16
-16
lines changed

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,28 @@ def onCreate(self):
2121
label4=lv.label(screen)
2222
label4.set_text(f"sys.platform:{sys.platform}")
2323
try:
24-
print("Trying to find out additional board info, not available on every platform...")
2524
label5=lv.label(screen)
2625
label5.set_text("")# otherwise it will show the default "Text" if there's an exception below
27-
importmachine
28-
label5.set_text(f"machine.freq:{machine.freq()}")
26+
fromesp32importPartition
27+
current=Partition(Partition.RUNNING)
28+
label5.set_text(f"Partition.RUNNING:{current}")
29+
next_partition=current.get_next_update()
2930
label6=lv.label(screen)
30-
label6.set_text(f"machine.unique_id():{machine.unique_id()}")
31-
label7=lv.label(screen)
32-
label7.set_text(f"machine.wake_reason():{machine.wake_reason()}")
33-
label8=lv.label(screen)
34-
label8.set_text(f"machine.reset_cause():{machine.reset_cause()}")
31+
label6.set_text(f"Next update partition:{next_partition}")
3532
exceptExceptionase:
36-
print(f"Additional board info got exception:{e}")
33+
print(f"Partition info got exception:{e}")
3734
try:
35+
print("Trying to find out additional board info, not available on every platform...")
36+
label7=lv.label(screen)
37+
label7.set_text("")# otherwise it will show the default "Text" if there's an exception below
38+
importmachine
39+
label7.set_text(f"machine.freq:{machine.freq()}")
40+
label8=lv.label(screen)
41+
label8.set_text(f"machine.unique_id():{machine.unique_id()}")
3842
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()
43+
label9.set_text(f"machine.wake_reason():{machine.wake_reason()}")
4444
label10=lv.label(screen)
45-
label10.set_text(f"Next update partition:{next_partition}")
45+
label10.set_text(f"machine.reset_cause():{machine.reset_cause()}")
4646
exceptExceptionase:
47-
print(f"Partition info got exception:{e}")
47+
print(f"Additional board info got exception:{e}")
4848
self.setContentView(screen)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp