mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Settings: Show free flash in internal storage info
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
- Desktop Keybinds should transfer correctly automatically
|
||||
|
||||
### Added:
|
||||
- Settings: Show free flash amount in internal storage info (by @Willy-JL)
|
||||
- OFW: RFID: Add GProxII support (by @BarTenderNZ)
|
||||
- OFW: iButton: Support ID writing (by @Astrrra)
|
||||
- OFW: FBT: Add `-Wundef` to compiler options (by @hedger)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "../storage_settings.h"
|
||||
#include <furi_hal_version.h>
|
||||
#include <furi_hal_flash.h>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -1384,12 +1384,12 @@ Function,+,furi_hal_dma_init_early,void,
|
||||
Function,-,furi_hal_flash_erase,void,uint8_t
|
||||
Function,-,furi_hal_flash_get_base,size_t,
|
||||
Function,-,furi_hal_flash_get_cycles_count,size_t,
|
||||
Function,-,furi_hal_flash_get_free_end_address,const void*,
|
||||
Function,+,furi_hal_flash_get_free_end_address,const void*,
|
||||
Function,-,furi_hal_flash_get_free_page_count,size_t,
|
||||
Function,-,furi_hal_flash_get_free_page_start_address,size_t,
|
||||
Function,-,furi_hal_flash_get_free_start_address,const void*,
|
||||
Function,+,furi_hal_flash_get_free_start_address,const void*,
|
||||
Function,-,furi_hal_flash_get_page_number,int16_t,size_t
|
||||
Function,-,furi_hal_flash_get_page_size,size_t,
|
||||
Function,+,furi_hal_flash_get_page_size,size_t,
|
||||
Function,-,furi_hal_flash_get_read_block_size,size_t,
|
||||
Function,-,furi_hal_flash_get_write_block_size,size_t,
|
||||
Function,-,furi_hal_flash_init,void,
|
||||
|
||||
|
Reference in New Issue
Block a user