pull/32/head
Holger Wirtz 5 years ago
parent 78733b8ff3
commit 17d815af47
  1. 6
      MicroDexed.ino
  2. 4
      UI.hpp
  3. 3
      config.h

@ -1315,11 +1315,11 @@ void initial_values_from_eeprom(bool init)
#if defined(TEENSY_AUDIO_BOARD) #if defined(TEENSY_AUDIO_BOARD)
// Special handling for SGTL5000 volume setting // Special handling for SGTL5000 volume setting
uint8_t sgtl5000_level = EEPROM[4095]; uint8_t sgtl5000_level = EEPROM[EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS];
if (sgtl5000_level >= SGTL5000_LINEOUT_LEVEL_MIN || sgtl5000_level <= SGTL5000_LINEOUT_LEVEL_MAX) if (sgtl5000_level >= SGTL5000_LINEOUT_LEVEL_MAX || sgtl5000_level <= SGTL5000_LINEOUT_LEVEL_MIN)
{ {
sgtl5000_level = SGTL5000_LINEOUT_LEVEL_DEFAULT; sgtl5000_level = SGTL5000_LINEOUT_LEVEL_DEFAULT;
EEPROM[4095] = SGTL5000_LINEOUT_LEVEL_DEFAULT; EEPROM[EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS] = SGTL5000_LINEOUT_LEVEL_DEFAULT;
} }
Serial.print(F("SGTL5000 output level: ")); Serial.print(F("SGTL5000 output level: "));
Serial.println(sgtl5000_level); Serial.println(sgtl5000_level);

@ -2993,7 +2993,7 @@ void UI_func_output_level(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP ********* if (LCDML.FUNC_setup()) // ****** SETUP *********
{ {
// setup function // setup function
sgtl5000_level = EEPROM[4095]; sgtl5000_level = EEPROM[EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS];
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Output Level", sgtl5000_level, SGTL5000_LINEOUT_LEVEL_MIN, SGTL5000_LINEOUT_LEVEL_MAX, 2, false, false, false, true); lcd_display_bar_int("Output Level", sgtl5000_level, SGTL5000_LINEOUT_LEVEL_MIN, SGTL5000_LINEOUT_LEVEL_MAX, 2, false, false, false, true);
} }
@ -3030,7 +3030,7 @@ void UI_func_output_level(uint8_t param)
{ {
// you can here reset some global vars or do nothing // you can here reset some global vars or do nothing
lcd_special_chars(SCROLLBAR); lcd_special_chars(SCROLLBAR);
EEPROM[4095] = sgtl5000_level; EEPROM[EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS] = sgtl5000_level;
} }
} }
#endif #endif

@ -221,6 +221,9 @@
// EEPROM address // EEPROM address
#define EEPROM_START_ADDRESS 100 #define EEPROM_START_ADDRESS 100
#if defined(TEENSY_AUDIO_BOARD)
#define EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS 4095
#endif
#define MAX_BANKS 100 #define MAX_BANKS 100
#define MAX_VOICES 32 // voices per bank #define MAX_VOICES 32 // voices per bank

Loading…
Cancel
Save