|
|
|
@ -1360,20 +1360,21 @@ void initial_values_from_eeprom(bool init) |
|
|
|
|
{ |
|
|
|
|
uint32_t _m_; |
|
|
|
|
|
|
|
|
|
EEPROM.get(EEPROM_START_ADDRESS + offsetof(configuration_s, _marker_), _m_); |
|
|
|
|
if (_m_ != EEPROM_MARKER) |
|
|
|
|
{ |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(F("Found wrong EEPROM marker, initializing EEPROM...")); |
|
|
|
|
#endif |
|
|
|
|
init = true; |
|
|
|
|
configuration._marker_ = EEPROM_MARKER; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (init == true) |
|
|
|
|
init_configuration(); |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
EEPROM.get(EEPROM_START_ADDRESS + offsetof(configuration_s, _marker_), _m_); |
|
|
|
|
if (_m_ != EEPROM_MARKER) |
|
|
|
|
{ |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(F("Found wrong EEPROM marker, initializing EEPROM...")); |
|
|
|
|
#endif |
|
|
|
|
init = true; |
|
|
|
|
configuration._marker_ = EEPROM_MARKER; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(F("Loading inital system data from EEPROM.")); |
|
|
|
|
#endif |
|
|
|
@ -1390,21 +1391,22 @@ void initial_values_from_eeprom(bool init) |
|
|
|
|
show_configuration(); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
check_configuration(); |
|
|
|
|
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
set_voiceconfig_params(instance_id); |
|
|
|
|
} |
|
|
|
|
set_fx_params(); |
|
|
|
|
set_sys_params(); |
|
|
|
|
|
|
|
|
|
set_volume(configuration.sys.vol, configuration.sys.mono); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(F("OK, loaded!")); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
check_configuration(); |
|
|
|
|
|
|
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
|
{ |
|
|
|
|
set_voiceconfig_params(instance_id); |
|
|
|
|
} |
|
|
|
|
set_fx_params(); |
|
|
|
|
set_sys_params(); |
|
|
|
|
set_volume(configuration.sys.vol, configuration.sys.mono); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
show_configuration(); |
|
|
|
|
#endif |
|
|
|
|