|
|
|
@ -3168,8 +3168,12 @@ void UI_func_volume(uint8_t param) |
|
|
|
|
|
|
|
|
|
void UI_func_load_performance(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
static uint8_t mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
mode = 0; |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
@ -3187,7 +3191,7 @@ void UI_func_load_performance(uint8_t param) |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
@ -3197,6 +3201,23 @@ void UI_func_load_performance(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
configuration.sys.performance_number = constrain(configuration.sys.performance_number - ENCODER[ENC_L].speed(), PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkEnter()) |
|
|
|
|
{ |
|
|
|
|
mode = 0xff; |
|
|
|
|
|
|
|
|
|
eeprom_write(); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
if (load_sd_performance(configuration.sys.performance_number) == false) |
|
|
|
|
lcd.print("Does not exist."); |
|
|
|
|
else |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
if (configuration.sys.performance_number == 0) |
|
|
|
@ -3212,11 +3233,13 @@ void UI_func_load_performance(uint8_t param) |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
eeprom_write(); |
|
|
|
|
load_sd_performance(configuration.sys.performance_number); |
|
|
|
|
if (mode < 0xff) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
lcd.print("Canceled "); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3282,7 +3305,20 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
LCDML.BT_quit(); // does not help :(
|
|
|
|
|
mode = 0xff; |
|
|
|
|
eeprom_write(); |
|
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
{ |
|
|
|
|
save_sd_performance(configuration.performance.fx_number); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3319,14 +3355,13 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
eeprom_write(); |
|
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
if (mode < 0xff) |
|
|
|
|
{ |
|
|
|
|
save_sd_performance(configuration.sys.performance_number); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
lcd.print("Canceled "); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3335,92 +3370,99 @@ void UI_func_load_voiceconfig(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
static int8_t instance_id; |
|
|
|
|
static uint8_t chosen; |
|
|
|
|
#else |
|
|
|
|
uint8_t instance_id = 0; |
|
|
|
|
#endif |
|
|
|
|
static bool yesno; |
|
|
|
|
|
|
|
|
|
static uint8_t mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
instance_id = 0; |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Load Config SD")); |
|
|
|
|
|
|
|
|
|
lcd.print(F("Load Voice Cfg")); |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
instance_id = -1; |
|
|
|
|
chosen = 0; |
|
|
|
|
mode = 0; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Instance [1]")); |
|
|
|
|
lcd.print(F("Instance [0]")); |
|
|
|
|
#else |
|
|
|
|
mode = 1; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("[NO ]")); |
|
|
|
|
if (configuration.performance.voiceconfig_number[instance_id] == 0) |
|
|
|
|
lcd.print(F("[DEFAULT]")); |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
char tmp[10]; |
|
|
|
|
sprintf(tmp, "[%7d]", configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
lcd.print(tmp); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
yesno = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) || (LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
|
{ |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp()) && instance_id < 0) |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
chosen = (chosen + 1) % 2; |
|
|
|
|
if (mode == 0) |
|
|
|
|
instance_id = (instance_id + 1) % 2; |
|
|
|
|
else if (mode == 1) |
|
|
|
|
configuration.performance.voiceconfig_number[instance_id] = constrain(configuration.performance.voiceconfig_number[instance_id] + ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkEnter() && instance_id < 0) |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
instance_id = chosen; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("[NO ] ")); |
|
|
|
|
if (mode == 0) |
|
|
|
|
instance_id = (instance_id - 1) % 2; |
|
|
|
|
else if (mode == 1) |
|
|
|
|
configuration.performance.voiceconfig_number[instance_id] = constrain(configuration.performance.voiceconfig_number[instance_id] - ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
} |
|
|
|
|
else if ((LCDML.BT_checkDown() || LCDML.BT_checkUp()) && instance_id >= 0) |
|
|
|
|
#else |
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp())) |
|
|
|
|
#endif |
|
|
|
|
else if (LCDML.BT_checkEnter()) |
|
|
|
|
{ |
|
|
|
|
yesno = !yesno; |
|
|
|
|
mode = 0xff; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
if (load_sd_voiceconfig(configuration.performance.voiceconfig_number[instance_id], instance_id) == false) |
|
|
|
|
lcd.print("Does not exist."); |
|
|
|
|
else |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
if (instance_id < 0) |
|
|
|
|
if (mode == 0) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(10, 1); |
|
|
|
|
lcd.print(chosen + 1); |
|
|
|
|
lcd.print(instance_id); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
#endif |
|
|
|
|
if (yesno == true) |
|
|
|
|
else if (mode == 1) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
lcd.print(F("YES")); |
|
|
|
|
} |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
if (configuration.performance.voiceconfig_number[instance_id] == 0) |
|
|
|
|
lcd.print(F("[DEFAULT]")); |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
lcd.print(F("NO ")); |
|
|
|
|
char tmp[10]; |
|
|
|
|
sprintf(tmp, "[%7d]", configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
lcd.print(tmp); |
|
|
|
|
} |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
//encoderDir[ENC_R].reset();
|
|
|
|
|
} |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
if (yesno == true) |
|
|
|
|
if (mode < 0xff) |
|
|
|
|
{ |
|
|
|
|
LCDML.DISP_clear(); |
|
|
|
|
lcd.print(F("Save Cfg SD")); |
|
|
|
|
|
|
|
|
|
load_sd_voiceconfig(configuration.performance.bank[instance_id], configuration.performance.voice[instance_id], instance_id); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Done.")); |
|
|
|
|
lcd.print("Canceled "); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3432,153 +3474,154 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
static int8_t instance_id; |
|
|
|
|
static uint8_t chosen; |
|
|
|
|
#else |
|
|
|
|
uint8_t instance_id = 0; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
static bool overwrite; |
|
|
|
|
static bool yesno; |
|
|
|
|
static uint8_t mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
yesno = false; |
|
|
|
|
instance_id = 0; |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Save Config SD")); |
|
|
|
|
|
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
instance_id = -1; |
|
|
|
|
chosen = 0; |
|
|
|
|
mode = 0; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Instance [1]")); |
|
|
|
|
lcd.print(F("Instance [0]")); |
|
|
|
|
#else |
|
|
|
|
mode = 1; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("[NO ]")); |
|
|
|
|
#endif |
|
|
|
|
if (configuration.performance.voice[instance_id] == 0) |
|
|
|
|
lcd.print(F("[DEFAULT]")); |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
char tmp[10]; |
|
|
|
|
sprintf(tmp, "[%7d]", configuration.performance.voice[instance_id]); |
|
|
|
|
lcd.print(tmp); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
yesno = false; |
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
overwrite = true; |
|
|
|
|
else |
|
|
|
|
overwrite = false; |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) || (LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
|
{ |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp()) && instance_id < 0) |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
chosen = (chosen + 1) % 2; |
|
|
|
|
if (mode == 0) |
|
|
|
|
instance_id = (instance_id + 1) % 2; |
|
|
|
|
else if (mode == 1) |
|
|
|
|
configuration.performance.voiceconfig_number[instance_id] = constrain(configuration.performance.voiceconfig_number[instance_id] + ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
else |
|
|
|
|
yesno = true; |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkEnter() && instance_id < 0) |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
instance_id = chosen; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("[NO ] ")); |
|
|
|
|
if (mode == 0) |
|
|
|
|
instance_id = (instance_id - 1) % 2; |
|
|
|
|
else if (mode == 1) |
|
|
|
|
configuration.performance.voiceconfig_number[instance_id] = constrain(configuration.performance.voiceconfig_number[instance_id] - ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
else |
|
|
|
|
yesno = false; |
|
|
|
|
} |
|
|
|
|
else if ((LCDML.BT_checkDown() || LCDML.BT_checkUp()) && instance_id >= 0) |
|
|
|
|
#else |
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp())) |
|
|
|
|
#endif |
|
|
|
|
else if (LCDML.BT_checkEnter()) |
|
|
|
|
{ |
|
|
|
|
yesno = !yesno; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
if (instance_id < 0) |
|
|
|
|
if (mode == 1 && overwrite == true) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(10, 1); |
|
|
|
|
lcd.print(chosen + 1); |
|
|
|
|
mode = 2; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Overwrite: [ ]")); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
#endif |
|
|
|
|
if (yesno == true) |
|
|
|
|
mode = 0xff; |
|
|
|
|
eeprom_write(); |
|
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
lcd.print(F("YES")); |
|
|
|
|
save_sd_voiceconfig(configuration.performance.voiceconfig_number[instance_id], instance_id); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
lcd.print(F("NO ")); |
|
|
|
|
} |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
//encoderDir[ENC_R].reset();
|
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
if (yesno == true) |
|
|
|
|
if (mode == 0) |
|
|
|
|
{ |
|
|
|
|
LCDML.DISP_clear(); |
|
|
|
|
lcd.print(F("Save Cfg SD")); |
|
|
|
|
|
|
|
|
|
save_sd_voiceconfig(configuration.performance.bank[instance_id], configuration.performance.voice[instance_id], instance_id); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Done.")); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
lcd.setCursor(10, 1); |
|
|
|
|
lcd.print(configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_save_voice(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
static bool yesno; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
else if (mode == 1) |
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
overwrite = true; |
|
|
|
|
else |
|
|
|
|
overwrite = false; |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Save Voice")); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("[NO ]")); |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
if (configuration.performance.voiceconfig_number[instance_id] == 0) |
|
|
|
|
lcd.print(F("[DEFAULT]")); |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp())) |
|
|
|
|
char tmp[10]; |
|
|
|
|
sprintf(tmp, "[%7d]", configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
lcd.print(tmp); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else if (mode == 2) |
|
|
|
|
{ |
|
|
|
|
yesno = !yesno; |
|
|
|
|
lcd.setCursor(12, 1); |
|
|
|
|
if (yesno == true) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
lcd.print(F("YES")); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
lcd.print(F("NO ")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
if (yesno == true) |
|
|
|
|
if (mode < 0xff) |
|
|
|
|
{ |
|
|
|
|
LCDML.DISP_clear(); |
|
|
|
|
lcd.print(F("Save Cfg default")); |
|
|
|
|
|
|
|
|
|
// Storing on inside bank TBD
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Done.")); |
|
|
|
|
lcd.print("Canceled "); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_load_fx(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
static uint8_t mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
mode = 0; |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
@ -3596,7 +3639,7 @@ void UI_func_load_fx(uint8_t param) |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
@ -3606,6 +3649,22 @@ void UI_func_load_fx(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
configuration.performance.fx_number = constrain(configuration.performance.fx_number - ENCODER[ENC_L].speed(), FX_NUM_MIN, FX_NUM_MAX); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkEnter()) |
|
|
|
|
{ |
|
|
|
|
mode = 0xff; |
|
|
|
|
eeprom_write(); |
|
|
|
|
|
|
|
|
|
if (load_sd_fx(configuration.performance.fx_number) == false) |
|
|
|
|
lcd.print("Does not exist."); |
|
|
|
|
else |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
if (configuration.performance.fx_number == 0) |
|
|
|
@ -3621,11 +3680,13 @@ void UI_func_load_fx(uint8_t param) |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
eeprom_write(); |
|
|
|
|
load_sd_fx(configuration.performance.fx_number); |
|
|
|
|
if (mode < 0xff) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
lcd.print("Canceled "); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3691,7 +3752,20 @@ void UI_func_save_fx(uint8_t param) |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
LCDML.BT_quit(); // does not help :(
|
|
|
|
|
mode = 0xff; |
|
|
|
|
eeprom_write(); |
|
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
{ |
|
|
|
|
save_sd_fx(configuration.performance.fx_number); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3728,16 +3802,65 @@ void UI_func_save_fx(uint8_t param) |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
eeprom_write(); |
|
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
if (mode < 0xff) |
|
|
|
|
{ |
|
|
|
|
save_sd_fx(configuration.performance.fx_number); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
lcd.print("Canceled "); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_save_voice(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
static bool yesno; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Save Voice")); |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("[NO ]")); |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp())) |
|
|
|
|
{ |
|
|
|
|
yesno = !yesno; |
|
|
|
|
if (yesno == true) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
lcd.print(F("YES")); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
lcd.print(F("NO ")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
if (yesno == true) |
|
|
|
|
{ |
|
|
|
|
LCDML.DISP_clear(); |
|
|
|
|
lcd.print(F("Save Cfg default")); |
|
|
|
|
|
|
|
|
|
// Storing on inside bank TBD
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Done.")); |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_sysex_receive_bank(uint8_t param) |
|
|
|
|