Browse Source

ExtUI::onPostprocessSettings (#21683)

vyacheslav-shubin 3 years ago
parent
commit
f424da498a
No account linked to committer's email address

+ 4
- 0
Marlin/src/lcd/extui/anycubic_chiron_lcd.cpp View File

@@ -88,6 +88,10 @@ namespace ExtUI {
88 88
     //  memcpy(&myDataStruct, buff, sizeof(myDataStruct));
89 89
   }
90 90
 
91
+  void onPostprocessSettings() {
92
+    // Called after loading or resetting stored settings
93
+  }
94
+
91 95
   void onConfigurationStoreWritten(bool success) {
92 96
     // Called after the entire EEPROM has been written,
93 97
     // whether successful or not.

+ 4
- 0
Marlin/src/lcd/extui/anycubic_i3mega_lcd.cpp View File

@@ -79,6 +79,10 @@ namespace ExtUI {
79 79
     //  memcpy(&myDataStruct, buff, sizeof(myDataStruct));
80 80
   }
81 81
 
82
+  void onPostprocessSettings() {
83
+    // Called after loading or resetting stored settings
84
+  }
85
+
82 86
   void onConfigurationStoreWritten(bool success) {
83 87
     // Called after the entire EEPROM has been written,
84 88
     // whether successful or not.

+ 4
- 0
Marlin/src/lcd/extui/dgus_lcd.cpp View File

@@ -98,6 +98,10 @@ namespace ExtUI {
98 98
     //  memcpy(&myDataStruct, buff, sizeof(myDataStruct));
99 99
   }
100 100
 
101
+  void onPostprocessSettings() {
102
+    // Called after loading or resetting stored settings
103
+  }
104
+
101 105
   void onConfigurationStoreWritten(bool success) {
102 106
     // Called after the entire EEPROM has been written,
103 107
     // whether successful or not.

+ 4
- 0
Marlin/src/lcd/extui/example.cpp View File

@@ -84,6 +84,10 @@ namespace ExtUI {
84 84
     //  memcpy(&myDataStruct, buff, sizeof(myDataStruct));
85 85
   }
86 86
 
87
+  void onPostprocessSettings() {
88
+    // Called after loading or resetting stored settings
89
+  }
90
+
87 91
   void onConfigurationStoreWritten(bool success) {
88 92
     // Called after the entire EEPROM has been written,
89 93
     // whether successful or not.

+ 4
- 0
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp View File

@@ -113,6 +113,10 @@ namespace ExtUI {
113 113
     InterfaceSettingsScreen::loadSettings(buff);
114 114
   }
115 115
 
116
+  void onPostprocessSettings() {
117
+    // Called after loading or resetting stored settings
118
+  }
119
+
116 120
   void onConfigurationStoreWritten(bool success) {
117 121
     #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
118 122
       if (success && InterfaceSettingsScreen::backupEEPROM()) {

+ 1
- 0
Marlin/src/lcd/extui/malyan_lcd.cpp View File

@@ -519,6 +519,7 @@ namespace ExtUI {
519 519
   void onFactoryReset() {}
520 520
   void onStoreSettings(char*) {}
521 521
   void onLoadSettings(const char*) {}
522
+  void onPostprocessSettings() {}
522 523
   void onConfigurationStoreWritten(bool) {}
523 524
   void onConfigurationStoreRead(bool) {}
524 525
 

+ 4
- 0
Marlin/src/lcd/extui/nextion_lcd.cpp View File

@@ -75,6 +75,10 @@ namespace ExtUI {
75 75
     //  memcpy(&myDataStruct, buff, sizeof(myDataStruct));
76 76
   }
77 77
 
78
+  void onPostprocessSettings() {
79
+    // Called after loading or resetting stored settings
80
+  }
81
+
78 82
   void onConfigurationStoreWritten(bool success) {
79 83
     // Called after the entire EEPROM has been written,
80 84
     // whether successful or not.

+ 1
- 0
Marlin/src/lcd/extui/ui_api.h View File

@@ -389,6 +389,7 @@ namespace ExtUI {
389 389
   void onFactoryReset();
390 390
   void onStoreSettings(char *);
391 391
   void onLoadSettings(const char *);
392
+  void onPostprocessSettings();
392 393
   void onConfigurationStoreWritten(bool success);
393 394
   void onConfigurationStoreRead(bool success);
394 395
   #if ENABLED(POWER_LOSS_RECOVERY)

+ 2
- 0
Marlin/src/module/settings.cpp View File

@@ -533,6 +533,8 @@ void MarlinSettings::postprocess() {
533 533
 
534 534
   TERN_(CASELIGHT_USES_BRIGHTNESS, caselight.update_brightness());
535 535
 
536
+  TERN_(EXTENSIBLE_UI, ExtUI::onPostprocessSettings());
537
+
536 538
   // Refresh steps_to_mm with the reciprocal of axis_steps_per_mm
537 539
   // and init stepper.count[], planner.position[] with current_position
538 540
   planner.refresh_positioning();

Loading…
Cancel
Save