💥 Rename ExtUI settings methods
This commit is contained in:
parent
b0d621d8b9
commit
4ec9af42b8
@ -94,12 +94,12 @@ namespace ExtUI {
|
|||||||
// Called after loading or resetting stored settings
|
// Called after loading or resetting stored settings
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreWritten(bool success) {
|
void onSettingsStored(bool success) {
|
||||||
// Called after the entire EEPROM has been written,
|
// Called after the entire EEPROM has been written,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreRead(bool success) {
|
void onSettingsLoaded(bool success) {
|
||||||
// Called after the entire EEPROM has been read,
|
// Called after the entire EEPROM has been read,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
|
@ -83,12 +83,12 @@ namespace ExtUI {
|
|||||||
// Called after loading or resetting stored settings
|
// Called after loading or resetting stored settings
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreWritten(bool success) {
|
void onSettingsStored(bool success) {
|
||||||
// Called after the entire EEPROM has been written,
|
// Called after the entire EEPROM has been written,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreRead(bool success) {
|
void onSettingsLoaded(bool success) {
|
||||||
// Called after the entire EEPROM has been read,
|
// Called after the entire EEPROM has been read,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
|
@ -102,12 +102,12 @@ namespace ExtUI {
|
|||||||
// Called after loading or resetting stored settings
|
// Called after loading or resetting stored settings
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreWritten(bool success) {
|
void onSettingsStored(bool success) {
|
||||||
// Called after the entire EEPROM has been written,
|
// Called after the entire EEPROM has been written,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreRead(bool success) {
|
void onSettingsLoaded(bool success) {
|
||||||
// Called after the entire EEPROM has been read,
|
// Called after the entire EEPROM has been read,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
|
@ -100,11 +100,11 @@ namespace ExtUI {
|
|||||||
|
|
||||||
void onPostprocessSettings() {}
|
void onPostprocessSettings() {}
|
||||||
|
|
||||||
void onConfigurationStoreWritten(bool success) {
|
void onSettingsStored(bool success) {
|
||||||
dgus_screen_handler.ConfigurationStoreWritten(success);
|
dgus_screen_handler.ConfigurationStoreWritten(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreRead(bool success) {
|
void onSettingsLoaded(bool success) {
|
||||||
dgus_screen_handler.ConfigurationStoreRead(success);
|
dgus_screen_handler.ConfigurationStoreRead(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,12 +88,12 @@ namespace ExtUI {
|
|||||||
// Called after loading or resetting stored settings
|
// Called after loading or resetting stored settings
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreWritten(bool success) {
|
void onSettingsStored(bool success) {
|
||||||
// Called after the entire EEPROM has been written,
|
// Called after the entire EEPROM has been written,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreRead(bool success) {
|
void onSettingsLoaded(bool success) {
|
||||||
// Called after the entire EEPROM has been read,
|
// Called after the entire EEPROM has been read,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ namespace ExtUI {
|
|||||||
void onLoadSettings(const char *buff) { InterfaceSettingsScreen::loadSettings(buff); }
|
void onLoadSettings(const char *buff) { InterfaceSettingsScreen::loadSettings(buff); }
|
||||||
void onPostprocessSettings() {} // Called after loading or resetting stored settings
|
void onPostprocessSettings() {} // Called after loading or resetting stored settings
|
||||||
|
|
||||||
void onConfigurationStoreWritten(bool success) {
|
void onSettingsStored(bool success) {
|
||||||
#ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
|
#ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
|
||||||
if (success && InterfaceSettingsScreen::backupEEPROM()) {
|
if (success && InterfaceSettingsScreen::backupEEPROM()) {
|
||||||
SERIAL_ECHOLNPGM("EEPROM backed up to SPI Flash");
|
SERIAL_ECHOLNPGM("EEPROM backed up to SPI Flash");
|
||||||
@ -106,7 +106,7 @@ namespace ExtUI {
|
|||||||
UNUSED(success);
|
UNUSED(success);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void onConfigurationStoreRead(bool) {}
|
void onSettingsLoaded(bool) {}
|
||||||
|
|
||||||
void onPlayTone(const uint16_t frequency, const uint16_t duration) { sound.play_tone(frequency, duration); }
|
void onPlayTone(const uint16_t frequency, const uint16_t duration) { sound.play_tone(frequency, duration); }
|
||||||
|
|
||||||
|
@ -147,8 +147,8 @@ namespace ExtUI {
|
|||||||
void onStoreSettings(char*) {}
|
void onStoreSettings(char*) {}
|
||||||
void onLoadSettings(const char*) {}
|
void onLoadSettings(const char*) {}
|
||||||
void onPostprocessSettings() {}
|
void onPostprocessSettings() {}
|
||||||
void onConfigurationStoreWritten(bool) {}
|
void onSettingsStored(bool) {}
|
||||||
void onConfigurationStoreRead(bool) {}
|
void onSettingsLoaded(bool) {}
|
||||||
|
|
||||||
#if HAS_MESH
|
#if HAS_MESH
|
||||||
void onLevelingStart() {}
|
void onLevelingStart() {}
|
||||||
|
@ -79,12 +79,12 @@ namespace ExtUI {
|
|||||||
// Called after loading or resetting stored settings
|
// Called after loading or resetting stored settings
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreWritten(bool success) {
|
void onSettingsStored(bool success) {
|
||||||
// Called after the entire EEPROM has been written,
|
// Called after the entire EEPROM has been written,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
|
|
||||||
void onConfigurationStoreRead(bool success) {
|
void onSettingsLoaded(bool success) {
|
||||||
// Called after the entire EEPROM has been read,
|
// Called after the entire EEPROM has been read,
|
||||||
// whether successful or not.
|
// whether successful or not.
|
||||||
}
|
}
|
||||||
@ -117,6 +117,7 @@ namespace ExtUI {
|
|||||||
|
|
||||||
void onSteppersDisabled() {}
|
void onSteppersDisabled() {}
|
||||||
void onSteppersEnabled() {}
|
void onSteppersEnabled() {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // NEXTION_TFT
|
#endif // NEXTION_TFT
|
||||||
|
@ -420,8 +420,8 @@ namespace ExtUI {
|
|||||||
void onStoreSettings(char *);
|
void onStoreSettings(char *);
|
||||||
void onLoadSettings(const char *);
|
void onLoadSettings(const char *);
|
||||||
void onPostprocessSettings();
|
void onPostprocessSettings();
|
||||||
void onConfigurationStoreWritten(bool success);
|
void onSettingsStored(bool success);
|
||||||
void onConfigurationStoreRead(bool success);
|
void onSettingsLoaded(bool success);
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
void onPowerLossResume();
|
void onPowerLossResume();
|
||||||
#endif
|
#endif
|
||||||
|
@ -177,7 +177,7 @@ void PrintCounter::saveStats() {
|
|||||||
persistentStore.write_data(address + sizeof(uint8_t), (uint8_t*)&data, sizeof(printStatistics));
|
persistentStore.write_data(address + sizeof(uint8_t), (uint8_t*)&data, sizeof(printStatistics));
|
||||||
persistentStore.access_finish();
|
persistentStore.access_finish();
|
||||||
|
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onConfigurationStoreWritten(true));
|
TERN_(EXTENSIBLE_UI, ExtUI::onSettingsStored(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAS_SERVICE_INTERVALS
|
#if HAS_SERVICE_INTERVALS
|
||||||
|
@ -1595,7 +1595,7 @@ void MarlinSettings::postprocess() {
|
|||||||
TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_SETTINGS_STORED)));
|
TERN_(HOST_PROMPT_SUPPORT, hostui.notify(GET_TEXT_F(MSG_SETTINGS_STORED)));
|
||||||
}
|
}
|
||||||
|
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onConfigurationStoreWritten(!eeprom_error));
|
TERN_(EXTENSIBLE_UI, ExtUI::onSettingsStored(!eeprom_error));
|
||||||
|
|
||||||
return !eeprom_error;
|
return !eeprom_error;
|
||||||
}
|
}
|
||||||
@ -2598,7 +2598,7 @@ void MarlinSettings::postprocess() {
|
|||||||
bool MarlinSettings::load() {
|
bool MarlinSettings::load() {
|
||||||
if (validate()) {
|
if (validate()) {
|
||||||
const bool success = _load();
|
const bool success = _load();
|
||||||
TERN_(EXTENSIBLE_UI, ExtUI::onConfigurationStoreRead(success));
|
TERN_(EXTENSIBLE_UI, ExtUI::onSettingsLoaded(success));
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
reset();
|
reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user