Skip to content

Commit 9fac0c6

Browse files
About app: add more info
1 parent 503576c commit 9fac0c6

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

internal_filesystem/builtin/apps/com.micropythonos.about/META-INF/MANIFEST.JSON

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"publisher": "MicroPythonOS",
44
"short_description": "Info about MicroPythonOS",
55
"long_description": "Shows current MicroPythonOS version, MicroPython version, build date and other useful info..",
6-
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.about/icons/com.micropythonos.about_0.0.1_64x64.png",
7-
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.about/mpks/com.micropythonos.about_0.0.1.mpk",
6+
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.about/icons/com.micropythonos.about_0.0.2_64x64.png",
7+
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.about/mpks/com.micropythonos.about_0.0.2.mpk",
88
"fullname": "com.micropythonos.about",
9-
"version": "0.0.1",
9+
"version": "0.0.2",
1010
"category": "development",
1111
"activities": [
1212
{

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,18 @@ def onCreate(self):
1818
label3.set_text(f"sys.implementation: {sys.implementation}")
1919
label4 = lv.label(screen)
2020
label4.set_text(f"sys.platform: {sys.platform}")
21+
try:
22+
print("Trying to find out additional board info, not available on every platform...")
23+
import machine
24+
label5 = lv.label(screen)
25+
label5.set_text("") # otherwise it will show the default "Text" if there's an exception below
26+
label5.set_text(f"machine.freq: {machine.freq()}")
27+
label6 = lv.label(screen)
28+
label6.set_text(f"machine.unique_id(): {machine.unique_id()}")
29+
label7 = lv.label(screen)
30+
label7.set_text(f"machine.wake_reason(): {machine.wake_reason()}")
31+
label8 = lv.label(screen)
32+
label8.set_text(f"machine.reset_cause(): {machine.reset_cause()}")
33+
except Exception as e:
34+
print(f"Additional board info got exception: {e}")
2135
self.setContentView(screen)

0 commit comments

Comments
 (0)