@@ -21,28 +21,28 @@ def onCreate(self):
2121label4 = lv .label (screen )
2222label4 .set_text (f"sys.platform:{ sys .platform } " )
2323try :
24- print ("Trying to find out additional board info, not available on every platform..." )
2524label5 = lv .label (screen )
2625label5 .set_text ("" )# otherwise it will show the default "Text" if there's an exception below
27- import machine
28- label5 .set_text (f"machine.freq:{ machine .freq ()} " )
26+ from esp32 import Partition
27+ current = Partition (Partition .RUNNING )
28+ label5 .set_text (f"Partition.RUNNING:{ current } " )
29+ next_partition = current .get_next_update ()
2930label6 = 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 } " )
3532except Exception as e :
36- print (f"Additional board info got exception:{ e } " )
33+ print (f"Partition info got exception:{ e } " )
3734try :
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+ import machine
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 ()} " )
3842label9 = lv .label (screen )
39- label9 .set_text ("" )# otherwise it will show the default "Text" if there's an exception below
40- from esp32 import Partition
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 ()} " )
4444label10 = lv .label (screen )
45- label10 .set_text (f"Next update partition :{ next_partition } " )
45+ label10 .set_text (f"machine.reset_cause() :{ machine . reset_cause () } " )
4646except Exception as e :
47- print (f"Partition info got exception:{ e } " )
47+ print (f"Additional board info got exception:{ e } " )
4848self .setContentView (screen )