Make change_disp_sd an ifdef

pull/3/head
Dirk Niggemann 5 years ago
parent 7e2d2f4133
commit dbecd69c55
  1. 18
      UI.hpp

@ -51,7 +51,9 @@ extern void strip_extension(char* s, char *target);
extern void eeprom_write(void); extern void eeprom_write(void);
extern bool get_voice_names_from_bank(uint8_t b); extern bool get_voice_names_from_bank(uint8_t b);
extern bool load_sysex(uint8_t b, uint8_t v); extern bool load_sysex(uint8_t b, uint8_t v);
#ifdef DISPLAY_LCD_SPI
extern void change_disp_sd(bool d); extern void change_disp_sd(bool d);
#endif
extern value_change_t soften_volume; extern value_change_t soften_volume;
extern value_change_t soften_filter_res; extern value_change_t soften_filter_res;
extern value_change_t soften_filter_cut; extern value_change_t soften_filter_cut;
@ -403,10 +405,14 @@ void encoder_right_up(void)
if (configuration.bank < MAX_BANKS) if (configuration.bank < MAX_BANKS)
{ {
configuration.bank++; configuration.bank++;
#ifdef DISPLAY_LCD_SPI
change_disp_sd(false); change_disp_sd(false);
#endif
load_sysex(configuration.bank, configuration.voice); load_sysex(configuration.bank, configuration.voice);
get_voice_names_from_bank(configuration.bank); get_voice_names_from_bank(configuration.bank);
#ifdef DISPLAY_LCD_SPI
change_disp_sd(true); change_disp_sd(true);
#endif
} }
break; break;
@ -421,10 +427,14 @@ void encoder_right_up(void)
configuration.voice = 0; configuration.voice = 0;
} }
} }
#ifdef DISPLAY_LCD_SPI
change_disp_sd(false); change_disp_sd(false);
#endif
load_sysex(configuration.bank, configuration.voice); load_sysex(configuration.bank, configuration.voice);
get_voice_names_from_bank(configuration.bank); get_voice_names_from_bank(configuration.bank);
#ifdef DISPLAY_LCD_SPI
change_disp_sd(true); change_disp_sd(true);
#endif
eeprom_write(); eeprom_write();
} }
@ -452,11 +462,15 @@ void encoder_right_down(void)
if (configuration.bank > 0) if (configuration.bank > 0)
{ {
configuration.bank--; configuration.bank--;
#ifdef DISPLAY_LCD_SPI
change_disp_sd(false); change_disp_sd(false);
#endif
load_sysex(configuration.bank, configuration.voice); load_sysex(configuration.bank, configuration.voice);
get_voice_names_from_bank(configuration.bank); get_voice_names_from_bank(configuration.bank);
#ifdef DISPLAY_LCD_SPI
change_disp_sd(true); change_disp_sd(true);
#endif
} }
break; break;
@ -471,10 +485,14 @@ void encoder_right_down(void)
configuration.voice = 31; configuration.voice = 31;
} }
} }
#ifdef DISPLAY_LCD_SPI
change_disp_sd(false); change_disp_sd(false);
#endif
load_sysex(configuration.bank, configuration.voice); load_sysex(configuration.bank, configuration.voice);
get_voice_names_from_bank(configuration.bank); get_voice_names_from_bank(configuration.bank);
#ifdef DISPLAY_LCD_SPI
change_disp_sd(true); change_disp_sd(true);
#endif
eeprom_write(); eeprom_write();
} }

Loading…
Cancel
Save