Fixes for writing config.

Fixes for ignoring config*.syx files in band directory.
pull/32/head
Holger Wirtz 5 years ago
parent 724f2908f0
commit 4bd73a6fb5
  1. 1
      UI.hpp
  2. 2
      UI_1_FX.h
  3. 8
      dexed_sysex.cpp

@ -3295,7 +3295,6 @@ void UI_func_save_config(uint8_t param)
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
lcd.print(F("Instance [1]")); lcd.print(F("Instance [1]"));
#else #else
int8_t instance_id = 0;
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
lcd.print(F("[NO ]")); lcd.print(F("[NO ]"));
#endif #endif

@ -98,7 +98,7 @@ LCDML_add(69, LCDML_0_2_3, 1, "Roomsize", UI_func_reverb_roomsize);
LCDML_add(70, LCDML_0_2_3, 2, "Damping", UI_func_reverb_damping); LCDML_add(70, LCDML_0_2_3, 2, "Damping", UI_func_reverb_damping);
LCDML_add(71, LCDML_0_2_3, 3, "Level", UI_func_reverb_level); LCDML_add(71, LCDML_0_2_3, 3, "Level", UI_func_reverb_level);
LCDML_add(72, LCDML_0, 3, "Load/Save", NULL); LCDML_add(72, LCDML_0, 3, "Load/Save", NULL);
//LCDML_add(74, LCDML_0_3, 2, "Load Perf. SD", UI_func_load_performance); //LCDML_add(73, LCDML_0_3, 2, "Load Perf. SD", UI_func_load_performance);
//LCDML_add(74, LCDML_0_3, 2, "Save Perf. SD", UI_func_save_performance); //LCDML_add(74, LCDML_0_3, 2, "Save Perf. SD", UI_func_save_performance);
LCDML_add(73, LCDML_0_3, 1, "Save Config SD", UI_func_save_config); LCDML_add(73, LCDML_0_3, 1, "Save Config SD", UI_func_save_config);
LCDML_add(74, LCDML_0_3, 3, "Save Voice SD", UI_func_save_voice); LCDML_add(74, LCDML_0_3, 3, "Save Voice SD", UI_func_save_voice);

@ -220,6 +220,11 @@ uint8_t get_bank_names(uint8_t instance_id)
File entry = root.openNextFile(); File entry = root.openNextFile();
if (!entry.isDirectory()) if (!entry.isDirectory())
{ {
while (strncmp(entry.name(), "CONFIG", 6) == 0)
{
entry = root.openNextFile();
}
strcpy(bank_names[instance_id][bank_counter], entry.name()); strcpy(bank_names[instance_id][bank_counter], entry.name());
#ifdef DEBUG #ifdef DEBUG
Serial.print(F("Found bank [")); Serial.print(F("Found bank ["));
@ -233,7 +238,7 @@ uint8_t get_bank_names(uint8_t instance_id)
return (bank_counter); return (bank_counter);
} }
else else
return (bank_counter); return (0);
} }
bool load_sysex(uint8_t b, uint8_t v, uint8_t instance_id) bool load_sysex(uint8_t b, uint8_t v, uint8_t instance_id)
@ -530,6 +535,7 @@ bool save_sysex_config(uint8_t b, uint8_t v, uint8_t instance_id)
if (write_sysex_config(sysex, configuration)) if (write_sysex_config(sysex, configuration))
{ {
sysex.close();
return (true); return (true);
} }
#ifdef DEBUG #ifdef DEBUG

Loading…
Cancel
Save