working sdlogger
This commit is contained in:
parent
5248646291
commit
e00aa7a50d
1 changed files with 2 additions and 0 deletions
2
main.py
2
main.py
|
|
@ -250,6 +250,8 @@ def sd_read_chunks(file):
|
|||
buf = bytearray(512)
|
||||
mv = memoryview(buf)
|
||||
while True:
|
||||
gc.collect()
|
||||
debug(f"gc.mem_free: {gc.mem_free()}")
|
||||
length = fd.readinto(mv)
|
||||
debug(f"read {length} bytes {fd.tell()}, garbage: {gc.mem_free()}")
|
||||
yield mv[0:length - 1]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue