diff --git a/CHANGELOG.md b/CHANGELOG.md index 512c080f..7494f781 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,11 @@ ===== - Fri3d Camp 2024 Badge: workaround ADC2+WiFi conflict by temporarily disable WiFi to measure battery level - Fri3d Camp 2024 Badge: improve battery monitor calibration to fix 0.1V delta +- About app: add free, used and total storage space info - AppStore app: remove unnecessary scrollbar over publisher's name - OSUpdate app: pause download when wifi is lost, resume when reconnected - Settings app: fix un-checking of radio button +- ImageView app: add support for grayscale images - API: SharedPreferences: add erase_all() functionality - API: improve and cleanup animations 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 d278f52c..7ec5cce7 100644 --- a/internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py +++ b/internal_filesystem/builtin/apps/com.micropythonos.about/assets/about.py @@ -85,7 +85,26 @@ class About(Activity): print("main.py: WARNING: could not import/run freezefs_mount_builtin: ", e) label11 = lv.label(screen) label11.set_text(f"freezefs_mount_builtin exception (normal on dev builds): {e}") - # TODO: - # - add total size, used and free space on internal storage - # - add total size, used and free space on SD card + # Disk usage: + import os + stat = os.statvfs('/') + total_space = stat[0] * stat[2] + free_space = stat[0] * stat[3] + used_space = total_space - free_space + label20 = lv.label(screen) + label20.set_text(f"Total space in /: {total_space} bytes") + label21 = lv.label(screen) + label21.set_text(f"Free space in /: {free_space} bytes") + label22 = lv.label(screen) + label22.set_text(f"Used space in /: {used_space} bytes") + stat = os.statvfs('/sdcard') + total_space = stat[0] * stat[2] + free_space = stat[0] * stat[3] + used_space = total_space - free_space + label23 = lv.label(screen) + label23.set_text(f"Total space /sdcard: {total_space} bytes") + label24 = lv.label(screen) + label24.set_text(f"Free space /sdcard: {free_space} bytes") + label25 = lv.label(screen) + label25.set_text(f"Used space /sdcard: {used_space} bytes") self.setContentView(screen)