From 6a934945061231dec138aa700ac47f4cde5e62a3 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Sun, 18 Aug 2024 00:45:04 +0300 Subject: [PATCH 1/3] Settings: Show free flash amount in internal storage info [ci skip] by Willy-JL --- .../scenes/storage_settings_scene_internal_info.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/applications/settings/storage_settings/scenes/storage_settings_scene_internal_info.c b/applications/settings/storage_settings/scenes/storage_settings_scene_internal_info.c index 5a367afcec..87a7ac6550 100644 --- a/applications/settings/storage_settings/scenes/storage_settings_scene_internal_info.c +++ b/applications/settings/storage_settings/scenes/storage_settings_scene_internal_info.c @@ -1,5 +1,6 @@ #include "../storage_settings.h" #include +#include static void storage_settings_scene_internal_info_dialog_callback(DialogExResult result, void* context) { @@ -27,10 +28,20 @@ void storage_settings_scene_internal_info_on_enter(void* context) { } else { furi_string_printf( app->text_string, - "Name: %s\nType: Virtual\nTotal: %lu KiB\nFree: %lu KiB", + "Name: %s\nType: Virtual (/.int on SD)\nTotal: %lu KiB\nFree: %lu KiB\n", furi_hal_version_get_name_ptr() ? furi_hal_version_get_name_ptr() : "Unknown", (uint32_t)(total_space / 1024), (uint32_t)(free_space / 1024)); + + uint32_t free_flash = + furi_hal_flash_get_free_end_address() - furi_hal_flash_get_free_start_address(); + if(free_flash < 1024) { + furi_string_cat_printf(app->text_string, "Flash: %lu B free", free_flash); + } else { + furi_string_cat_printf( + app->text_string, "Flash: %.2f KiB free", (double)free_flash / 1024); + } + dialog_ex_set_text( dialog_ex, furi_string_get_cstr(app->text_string), 4, 4, AlignLeft, AlignTop); } From a6d0efef83641dd1acb300ac7ebc4a10ef5daec6 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Sun, 18 Aug 2024 01:01:14 +0300 Subject: [PATCH 2/3] fix any path for badusb favourites --- applications/main/archive/helpers/archive_files.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/main/archive/helpers/archive_files.c b/applications/main/archive/helpers/archive_files.c index 868fa8a117..f4b49cd0e8 100644 --- a/applications/main/archive/helpers/archive_files.c +++ b/applications/main/archive/helpers/archive_files.c @@ -17,8 +17,8 @@ void archive_set_file_type(ArchiveFile_t* file, const char* path, bool is_folder if((known_ext[i][0] == '?') || (known_ext[i][0] == '*')) continue; if(furi_string_end_withi(file->path, known_ext[i])) { if((i == ArchiveFileTypeBadUsb) || (i == ArchiveFileTypeSubGhzRemote)) { - if(furi_string_search( - file->path, archive_get_default_path(ArchiveTabBadUsb)) == 0) { + if((furi_string_search(file->path, EXT_PATH("badusb")) == 0) || + (furi_string_search(file->path, ANY_PATH("badusb")) == 0)) { file->type = ArchiveFileTypeBadUsb; return; // *.txt file is a BadUSB script only if it is in BadUSB folder } From 889c80e9007dd34f5318c66c8b5747b917a8bcb6 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Sun, 18 Aug 2024 01:09:44 +0300 Subject: [PATCH 3/3] upd changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b51403f7c0..327e4446e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ * OFW: iButton ID writing (Enable ID writing for ds1971 and ds1996) * Apps: **Check out more Apps updates and fixes by following** [this link](https://github.com/xMasterX/all-the-plugins/commits/dev) ## Other changes +* Archive: Fix BadUSB favourite path check +* Settings: Show free flash amount in internal storage info (by @Willy-JL) * Misc: Fix typo in comment in QueueTools.py (by @eltociear | PR #785) * OFW PR 3840: GUI: NumberInput small improvements (by @Willy-JL) * OFW PR 3838: SubGhz: Fix RPC status for ButtonRelease event (by @Skorpionm)