mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-06-14 19:53:35 -07:00
Settings: Show SD decimals and percent free again
This commit is contained in:
@@ -34,20 +34,24 @@ void storage_settings_scene_sd_info_on_enter(void* context) {
|
||||
if(sd_info.kb_total < 1024) {
|
||||
furi_string_cat_printf(app->text_string, "Total: %lu KiB\n", sd_info.kb_total);
|
||||
} else if(sd_info.kb_total < 1024 * 1024) {
|
||||
furi_string_cat_printf(app->text_string, "Total: %lu MiB\n", sd_info.kb_total / 1024);
|
||||
furi_string_cat_printf(
|
||||
app->text_string, "Total: %.2f MiB\n", (double)sd_info.kb_total / 1024);
|
||||
} else {
|
||||
furi_string_cat_printf(
|
||||
app->text_string, "Total: %lu GiB\n", sd_info.kb_total / (1024 * 1024));
|
||||
app->text_string, "Total: %.2f GiB\n", (double)sd_info.kb_total / (1024 * 1024));
|
||||
}
|
||||
|
||||
if(sd_info.kb_free < 1024) {
|
||||
furi_string_cat_printf(app->text_string, "Free: %lu KiB\n", sd_info.kb_free);
|
||||
furi_string_cat_printf(app->text_string, "Free: %lu KiB", sd_info.kb_free);
|
||||
} else if(sd_info.kb_free < 1024 * 1024) {
|
||||
furi_string_cat_printf(app->text_string, "Free: %lu MiB\n", sd_info.kb_free / 1024);
|
||||
furi_string_cat_printf(
|
||||
app->text_string, "Free: %.2f MiB", (double)sd_info.kb_free / 1024);
|
||||
} else {
|
||||
furi_string_cat_printf(
|
||||
app->text_string, "Free: %lu GiB\n", sd_info.kb_free / (1024 * 1024));
|
||||
app->text_string, "Free: %.2f GiB", (double)sd_info.kb_free / (1024 * 1024));
|
||||
}
|
||||
furi_string_cat_printf(
|
||||
app->text_string, " (%.2f%%)\n", (double)sd_info.kb_free * 100 / sd_info.kb_total);
|
||||
|
||||
furi_string_cat_printf(
|
||||
app->text_string,
|
||||
|
||||
Reference in New Issue
Block a user