kopia lustrzana https://github.com/micropython/micropython-lib
utop: Print MicroPython memory info.
Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>pull/822/head
rodzic
0d60de65b7
commit
08e09afbe3
|
@ -1,3 +1,4 @@
|
||||||
|
import micropython
|
||||||
import time
|
import time
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -72,6 +73,12 @@ def top(update_interval_ms=1000, timeout_ms=None, thread_names={}):
|
||||||
print("INFO: Platform does not support listing active tasks.\x1b[K")
|
print("INFO: Platform does not support listing active tasks.\x1b[K")
|
||||||
line_count += 1
|
line_count += 1
|
||||||
|
|
||||||
|
print("\x1b[K")
|
||||||
|
line_count += 1
|
||||||
|
print("MicroPython ", end="")
|
||||||
|
micropython.mem_info()
|
||||||
|
line_count += 3
|
||||||
|
|
||||||
if previous_line_count > line_count:
|
if previous_line_count > line_count:
|
||||||
for _ in range(previous_line_count - line_count):
|
for _ in range(previous_line_count - line_count):
|
||||||
print("\x1b[K")
|
print("\x1b[K")
|
||||||
|
|
Ładowanie…
Reference in New Issue