Skip to content

Commit e1fd5ad

Browse files
authored
Merge branch 'solosky:develop' into develop
2 parents e832aa6 + 0f056ba commit e1fd5ad

24 files changed

+177
-91
lines changed

.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "Pixl.js JLink Debug",
1010
"cwd": "${workspaceRoot}",
1111
"executable": "fw/_build/pixljs.out",
12-
"armToolchainPath": "D:/dev/SDKs/gcc-arm-none-eabi-10-2020-q4-major/bin",
12+
"armToolchainPath": "",
1313
"request": "launch",
1414
"type": "cortex-debug",
1515
"servertype": "jlink",
@@ -22,7 +22,7 @@
2222
"name": "Pixl.js Pyocd Debug",
2323
"cwd": "${workspaceRoot}",
2424
"executable": "fw/_build/pixljs.out",
25-
"armToolchainPath": "D:/dev/SDKs/gcc-arm-none-eabi-10-2020-q4-major/bin",
25+
"armToolchainPath": "",
2626
"request": "launch",
2727
"type": "cortex-debug",
2828
"servertype": "pyocd",
@@ -35,7 +35,7 @@
3535
"name": "Pixl.js Openocd Debug",
3636
"cwd": "${workspaceRoot}",
3737
"executable": "fw/_build/pixljs.out",
38-
"armToolchainPath": "D:/dev/SDKs/gcc-arm-none-eabi-10-2020-q4-major/bin",
38+
"armToolchainPath": "",
3939
"request": "launch",
4040
"type": "cortex-debug",
4141
"servertype": "openocd",

fw/application/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,10 +613,10 @@ CFLAGS += -DBOARD_$(BOARD)
613613
ifneq ($(RELEASE), 1)
614614
CFLAGS += -DDEBUG
615615
CFLAGS += -DEBUG_NRF
616-
# CFLAGS += -DU8G2_USE_LARGE_GB2312_FONT
616+
#CFLAGS += -DU8G2_USE_LARGE_FONTS
617617
else
618618
CFLAGS += -DNDEBUG
619-
CFLAGS += -DU8G2_USE_LARGE_GB2312_FONT
619+
CFLAGS += -DU8G2_USE_LARGE_FONTS
620620
endif
621621
CFLAGS += -DMBEDTLS_CONFIG_FILE=\"nrf_crypto_mbedtls_config.h\"
622622
CFLAGS += -DM_USE_THREAD_BACKEND=0

fw/application/src/app/amiibo/scene/amiibo_scene_file_browser_menu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ static void amiibo_scene_file_browser_menu_on_selected(mui_list_view_event_t eve
256256
case FILE_BROWSER_MENU_REMOVE_FOLDER: {
257257
char msg[64];
258258
snprintf(msg, sizeof(msg), _T(DELETE_FILE), string_get_cstr(app->current_file));
259-
mui_msg_box_set_header(app->p_msg_box, getLangString(_L_DELETE));
259+
mui_msg_box_set_header(app->p_msg_box, getLangString(_L_TIPS));
260260
mui_msg_box_set_message(app->p_msg_box, msg);
261-
mui_msg_box_set_btn_text(app->p_msg_box, getLangString(_L_DELETE), NULL, getLangString(_L_CANCEL));
261+
mui_msg_box_set_btn_text(app->p_msg_box, getLangString(_L_CONFIRM), NULL, getLangString(_L_CANCEL));
262262
mui_msg_box_set_btn_focus(app->p_msg_box, 2);
263263
mui_msg_box_set_event_cb(app->p_msg_box, amiibo_scene_file_browser_menu_msg_box_remove_folder_event_cb);
264264

fw/application/src/app/amiidb/scene/amiidb_scene_amiibo_detail_menu.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ static void amiidb_scene_amiibo_detail_menu_on_selected(mui_list_view_event_t ev
9595
char txt[32];
9696
settings_data_t *p_settings = settings_get_data();
9797
p_settings->auto_gen_amiibo = !p_settings->auto_gen_amiibo;
98-
snprintf(txt, sizeof(txt), "[%s]",
99-
p_settings->auto_gen_amiibo ? getLangString(_L_ON) : getLangString(_L_OFF));
98+
snprintf(txt, sizeof(txt), "%s",
99+
p_settings->auto_gen_amiibo ? getLangString(_L_ON_F) : getLangString(_L_OFF_F));
100100
settings_save();
101101

102102
string_set_str(p_item->sub_text, txt);
@@ -108,7 +108,7 @@ static void amiidb_scene_amiibo_detail_menu_on_selected(mui_list_view_event_t ev
108108
char txt[32];
109109
settings_data_t *p_settings = settings_get_data();
110110
p_settings->qrcode_enabled = !p_settings->qrcode_enabled;
111-
snprintf(txt, sizeof(txt), "[%s]", p_settings->qrcode_enabled ? getLangString(_L_ON) : getLangString(_L_OFF));
111+
snprintf(txt, sizeof(txt), "%s", p_settings->qrcode_enabled ? getLangString(_L_ON_F) : getLangString(_L_OFF_F));
112112
settings_save();
113113

114114
string_set_str(p_item->sub_text, txt);
@@ -139,11 +139,11 @@ void amiidb_scene_amiibo_detail_menu_on_enter(void *user_data) {
139139
char txt[32];
140140
settings_data_t *p_settings = settings_get_data();
141141

142-
snprintf(txt, sizeof(txt), "[%s]", p_settings->auto_gen_amiibo ? getLangString(_L_ON) : getLangString(_L_OFF));
142+
snprintf(txt, sizeof(txt), "%s", p_settings->auto_gen_amiibo ? getLangString(_L_ON_F) : getLangString(_L_OFF_F));
143143
mui_list_view_add_item_ext(app->p_list_view, 0xe1c6, getLangString(_L_AUTO_RANDOM_GENERATION), txt,
144144
(void *)AMIIDB_DETAIL_MENU_AUTO_RAND_UID);
145145

146-
snprintf(txt, sizeof(txt), "[%s]", p_settings->qrcode_enabled ? getLangString(_L_ON) : getLangString(_L_OFF));
146+
snprintf(txt, sizeof(txt), "%s", p_settings->qrcode_enabled ? getLangString(_L_ON_F) : getLangString(_L_OFF_F));
147147
mui_list_view_add_item_ext(app->p_list_view, 0xe006, getLangString(_L_SHOW_QRCODE), txt,
148148
(void *)AMIIDB_DETAIL_MENU_SHOW_QRCODE);
149149
mui_list_view_add_item(app->p_list_view, ICON_FAVORITE, getLangString(_L_APP_AMIIDB_DETAIL_FAVORITE),

fw/application/src/app/settings/scene/settings_scene_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void settings_scene_main_reload(void *user_data) {
169169
(void *)SETTINGS_MAIN_MENU_OLED_CONTRAST);
170170
#else
171171
if (p_settings->lcd_backlight == 0) {
172-
snprintf(txt, sizeof(txt), "[%s]", getLangString(_L_OFF));
172+
snprintf(txt, sizeof(txt), "%s", getLangString(_L_OFF_F));
173173
} else {
174174
snprintf(txt, sizeof(txt), "[%d%%]", p_settings->lcd_backlight);
175175
}

fw/application/src/hal/hal_spi_flash.c

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#define MTC_W25Q32_BV (0x4016) /* W25Q32BV */
3939
#define MTC_W25Q32_DW (0x6016) /* W25Q32DW */
4040
#define MTC_W25Q64_BV_CV (0x4017) /* W25Q64BV W25Q64CV */
41-
#define MTC_W25Q64_DW (0x4017) /* W25Q64DW */
41+
#define MTC_W25Q64_DW (0x6017) /* W25Q64DW */
4242
#define MTC_W25Q128_BV (0x4018) /* W25Q128BV */
4343
#define MTC_W25Q256_FV (TBD) /* W25Q256FV */
4444
#define MTC_MX25L25645_GM2I (0x2019) /* MX25L25645GM2I-10G */
@@ -149,38 +149,48 @@ ret_code_t hal_spi_flash_info(flash_info_t *info) {
149149
memory_type_capacity = rx[1];
150150
memory_type_capacity = (memory_type_capacity << 8) | rx[2];
151151

152-
if (memory_type_capacity == MTC_MX25L25645_GM2I) {
153-
NRF_LOG_INFO("MX25L25645GM2I-10G detection");
154-
info->block_count = 8192;
155-
} else if (memory_type_capacity == MTC_W25Q128_BV) {
156-
NRF_LOG_INFO("W25Q128BV detection");
157-
info->block_count = 4096;
158-
} else if (memory_type_capacity == MTC_W25Q64_BV_CV) {
159-
NRF_LOG_INFO("W25Q64BV or W25Q64CV detection");
160-
info->block_count = 2048;
161-
} else if (memory_type_capacity == MTC_W25Q64_DW) {
162-
NRF_LOG_INFO("W25Q64DW detection");
163-
info->block_count = 2048;
164-
} else if (memory_type_capacity == MTC_W25Q32_BV) {
165-
NRF_LOG_INFO("W25Q32BV detection");
166-
info->block_count = 1024;
167-
} else if (memory_type_capacity == MTC_W25Q32_DW) {
168-
NRF_LOG_INFO("W25Q32DW detection");
169-
info->block_count = 1024;
170-
} else if (memory_type_capacity == MTC_W25Q16_BV_CL_CV) {
171-
NRF_LOG_INFO("W25Q16BV or W25Q16CL or W25Q16CV detection");
172-
info->block_count = 512;
173-
} else if (memory_type_capacity == MTC_W25Q16_DW) {
174-
NRF_LOG_INFO("W25Q16DW detection");
175-
info->block_count = 512;
176-
} else {
177-
NRF_LOG_INFO("Memory Capacity error! %d", memory_type_capacity);
178-
info->block_count = 0;
179-
return NRF_ERROR_INVALID_PARAM;
152+
switch (memory_type_capacity) {
153+
case MTC_MX25L25645_GM2I:
154+
NRF_LOG_INFO("MX25L25645GM2I-10G detection");
155+
info->block_count = 8192;
156+
break;
157+
case MTC_W25Q128_BV:
158+
NRF_LOG_INFO("W25Q128BV detection");
159+
info->block_count = 4096;
160+
break;
161+
case MTC_W25Q64_BV_CV:
162+
NRF_LOG_INFO("W25Q64BV or W25Q64CV detection");
163+
info->block_count = 2048;
164+
break;
165+
case MTC_W25Q64_DW:
166+
NRF_LOG_INFO("W25Q64DW detection");
167+
info->block_count = 2048;
168+
break;
169+
case MTC_W25Q32_BV:
170+
NRF_LOG_INFO("W25Q32BV detection");
171+
info->block_count = 1024;
172+
break;
173+
case MTC_W25Q32_DW:
174+
NRF_LOG_INFO("W25Q32DW detection");
175+
info->block_count = 1024;
176+
break;
177+
case MTC_W25Q16_BV_CL_CV:
178+
NRF_LOG_INFO("W25Q16BV or W25Q16CL or W25Q16CV detection");
179+
info->block_count = 512;
180+
break;
181+
case MTC_W25Q16_DW:
182+
NRF_LOG_INFO("W25Q16DW detection");
183+
info->block_count = 512;
184+
break;
185+
default:
186+
NRF_LOG_INFO("Memory Capacity error! %d", memory_type_capacity);
187+
info->block_count = 0;
188+
return NRF_ERROR_INVALID_PARAM;
180189
}
181190
return NRF_SUCCESS;
182191
}
183192

193+
184194
ret_code_t hal_spi_flash_read(uint32_t address, void *buffer, size_t size) {
185195

186196
uint8_t tx[4];

fw/application/src/i18n/de_DE.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ const char * const lang_de_DE[_L_COUNT] = {
6767
[_L_INPUT_AMIIBO_NAME] = "Amiibo Namen eingeben:",
6868
[_L_DELETE_FILE] = "%s löschen ?",
6969
[_L_DELETE] = "Löschen...",
70+
[_L_TIPS] = "Bestätigen",
7071
[_L_INPUT_NEW_NAME] = "Neuen Namen eingeben:",
7172
[_L_INVALID_INPUT] = "Ungültige Eingabe",
7273
[_L_CREATE_NEW_FOLDER] = "Neuer Ordner...",

fw/application/src/i18n/en_US.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ const char * const lang_en_US[_L_COUNT] = {
6767
[_L_INPUT_AMIIBO_NAME] = "Input Amiibo Name:",
6868
[_L_DELETE_FILE] = "Delete %s ?",
6969
[_L_DELETE] = "Delete...",
70+
[_L_TIPS] = "Confirm",
7071
[_L_INPUT_NEW_NAME] = "Input New Name:",
7172
[_L_INVALID_INPUT] = "Invalid Input",
7273
[_L_CREATE_NEW_FOLDER] = "Create New Folder...",

fw/application/src/i18n/es_ES.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ const char * const lang_es_ES[_L_COUNT] = {
6767
[_L_INPUT_AMIIBO_NAME] = "Nombre amiibo:",
6868
[_L_DELETE_FILE] = "¿Borrar el %s ?",
6969
[_L_DELETE] = "Borrar...",
70+
[_L_TIPS] = "Confirmar",
7071
[_L_INPUT_NEW_NAME] = "Nuevo nombre:",
7172
[_L_INVALID_INPUT] = "Entrada inválida",
7273
[_L_CREATE_NEW_FOLDER] = "Crear carpeta...",

fw/application/src/i18n/fr_FR.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ const char * const lang_fr_FR[_L_COUNT] = {
6767
[_L_INPUT_AMIIBO_NAME] = "Nom de l'Amiibo D'entrée:",
6868
[_L_DELETE_FILE] = "Supprimer le %s ?",
6969
[_L_DELETE] = "Supprimer...",
70+
[_L_TIPS] = "Confirmer",
7071
[_L_INPUT_NEW_NAME] = "Nouveau nom D'entrée:",
7172
[_L_INVALID_INPUT] = "Entrée Invalide",
7273
[_L_CREATE_NEW_FOLDER] = "Créer un Nouveau Dossier...",

0 commit comments

Comments
 (0)