diff --git a/internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py b/internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py index d8547460..2a2602e6 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py @@ -21,28 +21,28 @@ class About(Activity): 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...") label5 = lv.label(screen) label5.set_text("") # otherwise it will show the default "Text" if there's an exception below - import machine - 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}") - try: - label9 = lv.label(screen) - label9.set_text("") # otherwise it will show the default "Text" if there's an exception below from esp32 import Partition current = Partition(Partition.RUNNING) - label9.set_text(f"Partition.RUNNING: {current}") + label5.set_text(f"Partition.RUNNING: {current}") next_partition = current.get_next_update() - label10 = lv.label(screen) - label10.set_text(f"Next update partition: {next_partition}") + label6 = lv.label(screen) + label6.set_text(f"Next update partition: {next_partition}") except Exception as e: print(f"Partition info got exception: {e}") + try: + print("Trying to find out additional board info, not available on every platform...") + label7 = lv.label(screen) + label7.set_text("") # otherwise it will show the default "Text" if there's an exception below + import machine + label7.set_text(f"machine.freq: {machine.freq()}") + label8 = lv.label(screen) + label8.set_text(f"machine.unique_id(): {machine.unique_id()}") + label9 = lv.label(screen) + label9.set_text(f"machine.wake_reason(): {machine.wake_reason()}") + label10 = lv.label(screen) + label10.set_text(f"machine.reset_cause(): {machine.reset_cause()}") + except Exception as e: + print(f"Additional board info got exception: {e}") self.setContentView(screen)