Fixes for EEPROM reset.

pull/32/head
Holger Wirtz 5 years ago
parent 6ab47140a8
commit 1b7f9725a5
  1. 4
      MicroDexed.ino
  2. 33
      UI.hpp

@ -1329,6 +1329,8 @@ void check_configuration(void)
configuration.sys.mono = constrain(configuration.sys.mono, MONO_MIN, MONO_MAX);
configuration.sys.soft_midi_thru = constrain(configuration.sys.soft_midi_thru, SOFT_MIDI_THRU_MIN, SOFT_MIDI_THRU_MAX);
configuration.performance.fx_number = constrain(configuration.performance.fx_number, FX_NUM_MIN, FX_NUM_MAX);
configuration.fx.reverb_roomsize = constrain(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX);
configuration.fx.reverb_damping = constrain(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX);
configuration.fx.reverb_level = constrain(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX);
@ -1416,7 +1418,7 @@ void init_configuration(void)
configuration.fx.delay_level = DELAY_LEVEL_DEFAULT;
configuration.performance.checksum = 0xffff;
configuration.performance.fx_number = 0;
configuration.performance.fx_number = FX_NUM_DEFAULT;
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{

@ -2911,19 +2911,34 @@ void UI_func_eeprom_reset(uint8_t param)
encoderDir[ENC_R].reset();
// setup function
lcd.print("EEPROM reset?");
lcd.print("Reset EEPROM?");
lcd.setCursor(0, 1);
lcd.print("[NO ]");
}
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())
yesno = true;
else if (LCDML.BT_checkUp())
yesno = false;
else if (LCDML.BT_checkEnter())
{
if (yesno == true)
{
LCDML.DISP_clear();
lcd.print("Firmware reset:");
initial_values_from_eeprom(yesno);
lcd.setCursor(0, 1);
lcd.print("Done.");
delay(500);
_softRestart();
}
}
if (yesno == true)
{
@ -2940,18 +2955,10 @@ void UI_func_eeprom_reset(uint8_t param)
if (LCDML.FUNC_close()) // ****** STABLE END *********
{
if (yesno == true)
{
LCDML.DISP_clear();
lcd.print("Firmware reset:");
initial_values_from_eeprom(yesno);
lcd.setCursor(0, 1);
lcd.print("Done.");
lcd.print("Canceled ");
delay(500);
_softRestart();
}
encoderDir[ENC_R].reset();
}
}
@ -3705,7 +3712,7 @@ void UI_func_save_fx(uint8_t param)
encoderDir[ENC_R].reset();
lcd.setCursor(0, 0);
lcd.print(F("Save FX SD"));
lcd.print(F("Save FX"));
lcd.setCursor(0, 1);
if (configuration.performance.fx_number == 0)
lcd.print(F("[DEFAULT]"));

Loading…
Cancel
Save