File tree 11 files changed +49
-20
lines changed
11 files changed +49
-20
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ void PrintJobRecovery::changed() {
113
113
purge ();
114
114
else if (IS_SD_PRINTING ())
115
115
save (true );
116
+ TERN_ (EXTENSIBLE_UI, ExtUI::onSetPowerLoss (onoff));
116
117
}
117
118
118
119
/* *
Original file line number Diff line number Diff line change @@ -94,12 +94,12 @@ namespace ExtUI {
94
94
// Called after loading or resetting stored settings
95
95
}
96
96
97
- void onSettingsStored (bool success) {
97
+ void onSettingsStored (const bool success) {
98
98
// Called after the entire EEPROM has been written,
99
99
// whether successful or not.
100
100
}
101
101
102
- void onSettingsLoaded (bool success) {
102
+ void onSettingsLoaded (const bool success) {
103
103
// Called after the entire EEPROM has been read,
104
104
// whether successful or not.
105
105
}
@@ -120,6 +120,9 @@ namespace ExtUI {
120
120
#endif
121
121
122
122
#if ENABLED(POWER_LOSS_RECOVERY)
123
+ void onSetPowerLoss (const bool onoff) {
124
+ // Called when power-loss is enabled/disabled
125
+ }
123
126
void onPowerLoss () {
124
127
// Called when power-loss state is detected
125
128
}
Original file line number Diff line number Diff line change @@ -81,12 +81,12 @@ namespace ExtUI {
81
81
// Called after loading or resetting stored settings
82
82
}
83
83
84
- void onSettingsStored (bool success) {
84
+ void onSettingsStored (const bool success) {
85
85
// Called after the entire EEPROM has been written,
86
86
// whether successful or not.
87
87
}
88
88
89
- void onSettingsLoaded (bool success) {
89
+ void onSettingsLoaded (const bool success) {
90
90
// Called after the entire EEPROM has been read,
91
91
// whether successful or not.
92
92
}
@@ -106,6 +106,9 @@ namespace ExtUI {
106
106
#endif
107
107
108
108
#if ENABLED(POWER_LOSS_RECOVERY)
109
+ void onSetPowerLoss (const bool onoff) {
110
+ // Called when power-loss is enabled/disabled
111
+ }
109
112
void onPowerLoss () {
110
113
// Called when power-loss state is detected
111
114
}
Original file line number Diff line number Diff line change @@ -102,12 +102,12 @@ namespace ExtUI {
102
102
// Called after loading or resetting stored settings
103
103
}
104
104
105
- void onSettingsStored (bool success) {
105
+ void onSettingsStored (const bool success) {
106
106
// Called after the entire EEPROM has been written,
107
107
// whether successful or not.
108
108
}
109
109
110
- void onSettingsLoaded (bool success) {
110
+ void onSettingsLoaded (const bool success) {
111
111
// Called after the entire EEPROM has been read,
112
112
// whether successful or not.
113
113
}
@@ -126,6 +126,9 @@ namespace ExtUI {
126
126
#endif
127
127
128
128
#if ENABLED(POWER_LOSS_RECOVERY)
129
+ void onSetPowerLoss (const bool onoff) {
130
+ // Called when power-loss is enabled/disabled
131
+ }
129
132
void onPowerLoss () {
130
133
// Called when power-loss state is detected
131
134
}
Original file line number Diff line number Diff line change @@ -100,11 +100,11 @@ namespace ExtUI {
100
100
101
101
void onPostprocessSettings () {}
102
102
103
- void onSettingsStored (bool success) {
103
+ void onSettingsStored (const bool success) {
104
104
dgus_screen_handler.ConfigurationStoreWritten (success);
105
105
}
106
106
107
- void onSettingsLoaded (bool success) {
107
+ void onSettingsLoaded (const bool success) {
108
108
dgus_screen_handler.ConfigurationStoreRead (success);
109
109
}
110
110
@@ -123,6 +123,9 @@ namespace ExtUI {
123
123
#endif
124
124
125
125
#if ENABLED(POWER_LOSS_RECOVERY)
126
+ void onSetPowerLoss (const bool onoff) {
127
+ // Called when power-loss is enabled/disabled
128
+ }
126
129
void onPowerLoss () {
127
130
// Called when power-loss state is detected
128
131
}
Original file line number Diff line number Diff line change @@ -88,12 +88,12 @@ namespace ExtUI {
88
88
// Called after loading or resetting stored settings
89
89
}
90
90
91
- void onSettingsStored (bool success) {
91
+ void onSettingsStored (const bool success) {
92
92
// Called after the entire EEPROM has been written,
93
93
// whether successful or not.
94
94
}
95
95
96
- void onSettingsLoaded (bool success) {
96
+ void onSettingsLoaded (const bool success) {
97
97
// Called after the entire EEPROM has been read,
98
98
// whether successful or not.
99
99
}
@@ -112,6 +112,9 @@ namespace ExtUI {
112
112
#endif
113
113
114
114
#if ENABLED(POWER_LOSS_RECOVERY)
115
+ void onSetPowerLoss (const bool onoff) {
116
+ // Called when power-loss is enabled/disabled
117
+ }
115
118
void onPowerLoss () {
116
119
// Called when power-loss state is detected
117
120
}
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ namespace ExtUI {
97
97
void onLoadSettings (const char *buff) { InterfaceSettingsScreen::loadSettings (buff); }
98
98
void onPostprocessSettings () {} // Called after loading or resetting stored settings
99
99
100
- void onSettingsStored (bool success) {
100
+ void onSettingsStored (const bool success) {
101
101
#ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE
102
102
if (success && InterfaceSettingsScreen::backupEEPROM ()) {
103
103
SERIAL_ECHOLNPGM (" EEPROM backed up to SPI Flash" );
@@ -106,7 +106,7 @@ namespace ExtUI {
106
106
UNUSED (success);
107
107
#endif
108
108
}
109
- void onSettingsLoaded (bool ) {}
109
+ void onSettingsLoaded (const bool ) {}
110
110
111
111
void onPlayTone (const uint16_t frequency, const uint16_t duration) { sound.play_tone (frequency, duration); }
112
112
@@ -125,6 +125,9 @@ namespace ExtUI {
125
125
#endif
126
126
127
127
#if ENABLED(POWER_LOSS_RECOVERY)
128
+ void onSetPowerLoss (const bool onoff) {
129
+ // Called when power-loss is enabled/disabled
130
+ }
128
131
void onPowerLoss () {
129
132
// Called when power-loss state is detected
130
133
}
Original file line number Diff line number Diff line change @@ -1995,12 +1995,12 @@ namespace ExtUI {
1995
1995
SetTouchScreenConfiguration ();
1996
1996
}
1997
1997
1998
- void onSettingsStored (bool success) {
1998
+ void onSettingsStored (const bool success) {
1999
1999
// This is called after the entire EEPROM has been written,
2000
2000
// whether successful or not.
2001
2001
}
2002
2002
2003
- void onSettingsLoaded (bool success) {
2003
+ void onSettingsLoaded (const bool success) {
2004
2004
#if HAS_MESH
2005
2005
if (ExtUI::getMeshValid ()) {
2006
2006
uint8_t abl_probe_index = 0 ;
@@ -2026,6 +2026,9 @@ namespace ExtUI {
2026
2026
}
2027
2027
2028
2028
#if ENABLED(POWER_LOSS_RECOVERY)
2029
+ void onSetPowerLoss (const bool onoff) {
2030
+ // Called when power-loss is enabled/disabled
2031
+ }
2029
2032
void onPowerLoss () {
2030
2033
// Called when power-loss state is detected
2031
2034
}
Original file line number Diff line number Diff line change @@ -147,8 +147,8 @@ namespace ExtUI {
147
147
void onStoreSettings (char *) {}
148
148
void onLoadSettings (const char *) {}
149
149
void onPostprocessSettings () {}
150
- void onSettingsStored (bool ) {}
151
- void onSettingsLoaded (bool ) {}
150
+ void onSettingsStored (const bool ) {}
151
+ void onSettingsLoaded (const bool ) {}
152
152
153
153
#if HAS_MESH
154
154
void onLevelingStart () {}
@@ -158,6 +158,9 @@ namespace ExtUI {
158
158
#endif
159
159
160
160
#if ENABLED(POWER_LOSS_RECOVERY)
161
+ void onSetPowerLoss (const bool onoff) {
162
+ // Called when power-loss is enabled/disabled
163
+ }
161
164
void onPowerLoss () {
162
165
// Called when power-loss state is detected
163
166
}
Original file line number Diff line number Diff line change @@ -79,12 +79,12 @@ namespace ExtUI {
79
79
// Called after loading or resetting stored settings
80
80
}
81
81
82
- void onSettingsStored (bool success) {
82
+ void onSettingsStored (const bool success) {
83
83
// Called after the entire EEPROM has been written,
84
84
// whether successful or not.
85
85
}
86
86
87
- void onSettingsLoaded (bool success) {
87
+ void onSettingsLoaded (const bool success) {
88
88
// Called after the entire EEPROM has been read,
89
89
// whether successful or not.
90
90
}
@@ -103,6 +103,9 @@ namespace ExtUI {
103
103
#endif
104
104
105
105
#if ENABLED(POWER_LOSS_RECOVERY)
106
+ void onSetPowerLoss (const bool onoff) {
107
+ // Called when power-loss is enabled/disabled
108
+ }
106
109
void onPowerLoss () {
107
110
// Called when power-loss state is detected
108
111
}
Original file line number Diff line number Diff line change @@ -423,9 +423,10 @@ namespace ExtUI {
423
423
void onStoreSettings (char *);
424
424
void onLoadSettings (const char *);
425
425
void onPostprocessSettings ();
426
- void onSettingsStored (bool success);
427
- void onSettingsLoaded (bool success);
426
+ void onSettingsStored (const bool success);
427
+ void onSettingsLoaded (const bool success);
428
428
#if ENABLED(POWER_LOSS_RECOVERY)
429
+ void onSetPowerLoss (const bool onoff);
429
430
void onPowerLoss ();
430
431
void onPowerLossResume ();
431
432
#endif
You canβt perform that action at this time.
0 commit comments