mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-02 22:18:56 -07:00
Fix build | update storage_settings_scene_sd_info.c
This commit is contained in:
@@ -28,33 +28,6 @@ void storage_settings_scene_sd_info_on_enter(void* context) {
|
||||
dialog_ex, "Try to reinsert\nor format SD\ncard.", 3, 19, AlignLeft, AlignTop);
|
||||
dialog_ex_set_center_button_text(dialog_ex, "Ok");
|
||||
} else {
|
||||
char unit_kb[] = "KB";
|
||||
char unit_mb[] = "MB";
|
||||
char unit_gb[] = "GB";
|
||||
|
||||
double sd_total_val = (double)sd_info.kb_total;
|
||||
char* sd_total_unit = unit_kb;
|
||||
double sd_free_val = (double)sd_info.kb_free;
|
||||
char* sd_free_unit = unit_kb;
|
||||
|
||||
if(sd_total_val > 1024) {
|
||||
sd_total_val /= 1024;
|
||||
sd_total_unit = unit_mb;
|
||||
}
|
||||
if(sd_total_val > 1024) {
|
||||
sd_total_val /= 1024;
|
||||
sd_total_unit = unit_gb;
|
||||
}
|
||||
|
||||
if(sd_free_val > 1024) {
|
||||
sd_free_val /= 1024;
|
||||
sd_free_unit = unit_mb;
|
||||
}
|
||||
if(sd_free_val > 1024) {
|
||||
sd_free_val /= 1024;
|
||||
sd_free_unit = unit_gb;
|
||||
}
|
||||
|
||||
furi_string_printf(
|
||||
app->text_string,
|
||||
"Label: %s\nType: %s\n%lu KiB total\n%lu KiB free\n"
|
||||
@@ -109,4 +82,4 @@ void storage_settings_scene_sd_info_on_exit(void* context) {
|
||||
dialog_ex_reset(dialog_ex);
|
||||
|
||||
furi_string_reset(app->text_string);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user