|
|
|
@ -4602,8 +4602,8 @@ void UI_func_save_performance(uint8_t param) { |
|
|
|
|
overwrite = false; |
|
|
|
|
if (check_sd_performance_exists(temp_int)) { |
|
|
|
|
get_sd_performance_name_json(temp_int); |
|
|
|
|
if (configuration.performance.name_temp[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name_temp); |
|
|
|
|
if (configuration.performance.name[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name); |
|
|
|
|
else |
|
|
|
|
display.print("-- DATA -- "); |
|
|
|
|
} else |
|
|
|
@ -4660,8 +4660,8 @@ void UI_func_save_performance(uint8_t param) { |
|
|
|
|
display.print("-- EMPTY --"); |
|
|
|
|
} else if (check_sd_performance_exists(temp_int)) { |
|
|
|
|
get_sd_performance_name_json(temp_int); |
|
|
|
|
if (configuration.performance.name_temp[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name_temp); |
|
|
|
|
if (configuration.performance.name[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name); |
|
|
|
|
else display.print("-- DATA -- "); |
|
|
|
|
} else display.print("-- EMPTY --"); |
|
|
|
|
} else if (mode < 0xff) { |
|
|
|
@ -4704,8 +4704,8 @@ void UI_func_load_performance(uint8_t param) { |
|
|
|
|
display.print(tmp); |
|
|
|
|
if (check_sd_performance_exists(temp_int)) { |
|
|
|
|
get_sd_performance_name_json(temp_int); |
|
|
|
|
if (configuration.performance.name_temp[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name_temp); |
|
|
|
|
if (configuration.performance.name[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name); |
|
|
|
|
else |
|
|
|
|
display.print(" -- DATA -- "); |
|
|
|
|
} else display.print(" -- EMPTY --"); |
|
|
|
@ -4737,8 +4737,8 @@ void UI_func_load_performance(uint8_t param) { |
|
|
|
|
display.print(tmp); |
|
|
|
|
if (check_sd_performance_exists(temp_int)) { |
|
|
|
|
get_sd_performance_name_json(temp_int); |
|
|
|
|
if (configuration.performance.name_temp[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name_temp); |
|
|
|
|
if (configuration.performance.name[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name); |
|
|
|
|
else |
|
|
|
|
display.print(" -- DATA -- "); |
|
|
|
|
} else display.print(" -- EMPTY --"); |
|
|
|
@ -5533,26 +5533,16 @@ void UI_func_set_performance_name(uint8_t param) { |
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) { |
|
|
|
|
if (LCDML.BT_checkDown()) { |
|
|
|
|
if (mode == 1) ui_select_name_state = UI_select_name(1, 1, configuration.performance.name_temp, BANK_NAME_LEN - 1, false); |
|
|
|
|
if (mode == 1) ui_select_name_state = UI_select_name(1, 1, configuration.performance.name, PERFORMANCE_NAME_LEN - 1, false); |
|
|
|
|
} else if (LCDML.BT_checkUp()) { |
|
|
|
|
if (mode == 1) ui_select_name_state = UI_select_name(1, 1, configuration.performance.name_temp, BANK_NAME_LEN - 1, false); |
|
|
|
|
// if (ui_select_name_state == false) {
|
|
|
|
|
// display.setCursor(12, 1);
|
|
|
|
|
// display.print(" ");
|
|
|
|
|
// display.setCursor(0, 1);
|
|
|
|
|
// display.print("[");
|
|
|
|
|
// display.setCursor(11, 1);
|
|
|
|
|
// display.print("]");
|
|
|
|
|
// display.blink();
|
|
|
|
|
// ui_select_name_state = UI_select_name(1, 1, configuration.performance.name_temp, BANK_NAME_LEN - 1, true);
|
|
|
|
|
// }
|
|
|
|
|
if (mode == 1) ui_select_name_state = UI_select_name(1, 1, configuration.performance.name, PERFORMANCE_NAME_LEN - 1, false); |
|
|
|
|
} |
|
|
|
|
} else if (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) { |
|
|
|
|
|
|
|
|
|
if (mode == 1) { |
|
|
|
|
ui_select_name_state = UI_select_name(1, 1, configuration.performance.name_temp, BANK_NAME_LEN - 1, false); |
|
|
|
|
ui_select_name_state = UI_select_name(1, 1, configuration.performance.name, PERFORMANCE_NAME_LEN - 1, false); |
|
|
|
|
if (ui_select_name_state == true) { |
|
|
|
|
strlcpy(configuration.performance.name, configuration.performance.name_temp, sizeof(configuration.performance.name)); |
|
|
|
|
strlcpy(configuration.performance.name, configuration.performance.name, sizeof(configuration.performance.name)); |
|
|
|
|
mode = 0xff; |
|
|
|
|
display.noBlink(); |
|
|
|
|
display.setCursor(0, 1); |
|
|
|
@ -5564,10 +5554,10 @@ void UI_func_set_performance_name(uint8_t param) { |
|
|
|
|
} |
|
|
|
|
if (mode == 0) { |
|
|
|
|
mode = 1; |
|
|
|
|
strlcpy(configuration.performance.name_temp, configuration.performance.name, sizeof(configuration.performance.name_temp)); |
|
|
|
|
strlcpy(configuration.performance.name, configuration.performance.name, sizeof(configuration.performance.name)); |
|
|
|
|
display.setCursor(0, 1); |
|
|
|
|
display.print(F("[ ] ")); |
|
|
|
|
ui_select_name_state = UI_select_name(1, 1, configuration.performance.name_temp, BANK_NAME_LEN - 1, true); |
|
|
|
|
ui_select_name_state = UI_select_name(1, 1, configuration.performance.name, PERFORMANCE_NAME_LEN - 1, true); |
|
|
|
|
display.blink(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|