-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61eb86e
commit 4b95f53
Showing
1 changed file
with
37 additions
and
18 deletions.
There are no files selected for viewing
55 changes: 37 additions & 18 deletions
55
firmware/main/modules/settings/sd_card/sd_card_settings_screens_module.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,62 @@ | ||
#include "oled_screen.h" | ||
|
||
#ifdef CONFIG_RESOLUTION_128X64 | ||
#define screen_64 1 | ||
#else // CONFIG_RESOLUTION_128X32 | ||
#define screen_64 0 | ||
#endif | ||
|
||
void sd_card_settings_screens_module_no_sd_card() { | ||
oled_screen_clear(); | ||
oled_screen_display_text_center("No SD Card", 2, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("detected!", 3, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", 5, OLED_DISPLAY_INVERT); | ||
oled_screen_display_text_center("No SD Card", screen_64 ? 2 : 0, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("detected!", screen_64 ? 3 : 1, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", screen_64 ? 5 : 3, OLED_DISPLAY_INVERT); | ||
} | ||
|
||
void sd_card_settings_screens_module_sd_card_ok() { | ||
oled_screen_clear(); | ||
oled_screen_display_text_center("SD Card can", 2, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("be used safety", 3, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", 5, OLED_DISPLAY_INVERT); | ||
oled_screen_display_text_center("SD Card can", screen_64 ? 2 : 0, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("be used safety", screen_64 ? 3 : 1, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", screen_64 ? 5 : 3, OLED_DISPLAY_INVERT); | ||
} | ||
|
||
void sd_card_settings_screens_module_format_question() { | ||
oled_screen_clear(); | ||
oled_screen_display_text_center("SD Card is not", 1, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("in FAT32,", 2, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Format?", 3, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", 5, OLED_DISPLAY_INVERT); | ||
oled_screen_display_text_center("SD Card is not", screen_64 ? 1 : 0, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("in FAT32,", screen_64 ? 2 : 1, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Format?", screen_64 ? 3 : 2, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", screen_64 ? 5 : 3, OLED_DISPLAY_INVERT); | ||
} | ||
|
||
void sd_card_settings_screens_module_formating_sd_card() { | ||
oled_screen_clear(); | ||
oled_screen_display_text_center("Formating SD", 2, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Card... don't", 3, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("remove it!", 4, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Formating SD", screen_64 ? 2 : 0, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Card... don't", screen_64 ? 3 : 1, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("remove it!", screen_64 ? 4 : 2, | ||
OLED_DISPLAY_NORMAL); | ||
} | ||
|
||
void sd_card_settings_screens_module_failed_format_sd_card() { | ||
oled_screen_clear(); | ||
oled_screen_display_text_center("Failed to", 2, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("format SD Card", 3, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", 5, OLED_DISPLAY_INVERT); | ||
oled_screen_display_text_center("Failed to", screen_64 ? 2 : 0, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("format SD Card", screen_64 ? 3 : 1, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", screen_64 ? 5 : 3, OLED_DISPLAY_INVERT); | ||
} | ||
|
||
void sd_card_settings_screens_module_format_done() { | ||
oled_screen_clear(); | ||
oled_screen_display_text_center("Format done!", 3, OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", 5, OLED_DISPLAY_INVERT); | ||
oled_screen_display_text_center("Format done!", screen_64 ? 3 : 1, | ||
OLED_DISPLAY_NORMAL); | ||
oled_screen_display_text_center("Ok", screen_64 ? 3 : 0, OLED_DISPLAY_INVERT); | ||
} |