You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
About app: add more info
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
"publisher": "MicroPythonOS",
|
||||
"short_description": "Info about MicroPythonOS",
|
||||
"long_description": "Shows current MicroPythonOS version, MicroPython version, build date and other useful info..",
|
||||
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.about/icons/com.micropythonos.about_0.0.1_64x64.png",
|
||||
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.about/mpks/com.micropythonos.about_0.0.1.mpk",
|
||||
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.about/icons/com.micropythonos.about_0.0.2_64x64.png",
|
||||
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.about/mpks/com.micropythonos.about_0.0.2.mpk",
|
||||
"fullname": "com.micropythonos.about",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"category": "development",
|
||||
"activities": [
|
||||
{
|
||||
|
||||
@@ -18,4 +18,18 @@ class About(Activity):
|
||||
label3.set_text(f"sys.implementation: {sys.implementation}")
|
||||
label4 = lv.label(screen)
|
||||
label4.set_text(f"sys.platform: {sys.platform}")
|
||||
try:
|
||||
print("Trying to find out additional board info, not available on every platform...")
|
||||
import machine
|
||||
label5 = lv.label(screen)
|
||||
label5.set_text("") # otherwise it will show the default "Text" if there's an exception below
|
||||
label5.set_text(f"machine.freq: {machine.freq()}")
|
||||
label6 = lv.label(screen)
|
||||
label6.set_text(f"machine.unique_id(): {machine.unique_id()}")
|
||||
label7 = lv.label(screen)
|
||||
label7.set_text(f"machine.wake_reason(): {machine.wake_reason()}")
|
||||
label8 = lv.label(screen)
|
||||
label8.set_text(f"machine.reset_cause(): {machine.reset_cause()}")
|
||||
except Exception as e:
|
||||
print(f"Additional board info got exception: {e}")
|
||||
self.setContentView(screen)
|
||||
|
||||
Reference in New Issue
Block a user