|
@@ -170,12 +170,17 @@ namespace ExtUI {
|
170
|
170
|
|
171
|
171
|
void enableHeater(const heater_t heater) {
|
172
|
172
|
#if HEATER_IDLE_HANDLER
|
173
|
|
- #if HAS_HEATED_BED
|
174
|
|
- if (heater == BED)
|
175
|
|
- thermalManager.reset_bed_idle_timer();
|
176
|
|
- else
|
177
|
|
- #endif
|
178
|
|
- thermalManager.reset_heater_idle_timer(heater - H0);
|
|
173
|
+ switch (heater) {
|
|
174
|
+ #if HAS_HEATED_BED
|
|
175
|
+ case BED:
|
|
176
|
+ thermalManager.reset_bed_idle_timer();
|
|
177
|
+ return;
|
|
178
|
+ #endif
|
|
179
|
+ #if HAS_HEATED_CHAMBER
|
|
180
|
+ case CHAMBER: return; // Chamber has no idle timer
|
|
181
|
+ #endif
|
|
182
|
+ default: thermalManager.reset_heater_idle_timer(heater - H0);
|
|
183
|
+ }
|
179
|
184
|
#endif
|
180
|
185
|
}
|
181
|
186
|
|
|
@@ -188,23 +193,31 @@ namespace ExtUI {
|
188
|
193
|
}
|
189
|
194
|
|
190
|
195
|
bool isHeaterIdle(const heater_t heater) {
|
191
|
|
- return (false
|
192
|
|
- #if HEATER_IDLE_HANDLER
|
193
|
|
- || (heater == BED ? (false
|
194
|
|
- #if HAS_HEATED_BED
|
195
|
|
- || thermalManager.bed_idle.timed_out
|
196
|
|
- #endif
|
197
|
|
- ) : thermalManager.hotend_idle[heater - H0].timed_out)
|
198
|
|
- #endif
|
199
|
|
- );
|
|
196
|
+ #if HEATER_IDLE_HANDLER
|
|
197
|
+ switch (heater) {
|
|
198
|
+ #if HAS_HEATED_BED
|
|
199
|
+ case BED: return thermalManager.bed_idle.timed_out;
|
|
200
|
+ #endif
|
|
201
|
+ #if HAS_HEATED_CHAMBER
|
|
202
|
+ case CHAMBER: return false; // Chamber has no idle timer
|
|
203
|
+ #endif
|
|
204
|
+ default: return thermalManager.hotend_idle[heater - H0].timed_out;
|
|
205
|
+ }
|
|
206
|
+ #else
|
|
207
|
+ return false;
|
|
208
|
+ #endif
|
200
|
209
|
}
|
201
|
210
|
|
202
|
211
|
float getActualTemp_celsius(const heater_t heater) {
|
203
|
|
- return heater == BED ? (0
|
|
212
|
+ switch (heater) {
|
204
|
213
|
#if HAS_HEATED_BED
|
205
|
|
- + thermalManager.degBed()
|
|
214
|
+ case BED: return thermalManager.degBed();
|
|
215
|
+ #endif
|
|
216
|
+ #if HAS_HEATED_CHAMBER
|
|
217
|
+ case CHAMBER: return thermalManager.degChamber();
|
206
|
218
|
#endif
|
207
|
|
- ) : thermalManager.degHotend(heater - H0);
|
|
219
|
+ default: return thermalManager.degHotend(heater - H0);
|
|
220
|
+ }
|
208
|
221
|
}
|
209
|
222
|
|
210
|
223
|
float getActualTemp_celsius(const extruder_t extruder) {
|
|
@@ -212,11 +225,15 @@ namespace ExtUI {
|
212
|
225
|
}
|
213
|
226
|
|
214
|
227
|
float getTargetTemp_celsius(const heater_t heater) {
|
215
|
|
- return heater == BED ? (0
|
|
228
|
+ switch (heater) {
|
216
|
229
|
#if HAS_HEATED_BED
|
217
|
|
- + thermalManager.degTargetBed()
|
|
230
|
+ case BED: return thermalManager.degTargetBed();
|
218
|
231
|
#endif
|
219
|
|
- ) : thermalManager.degTargetHotend(heater - H0);
|
|
232
|
+ #if HAS_HEATED_CHAMBER
|
|
233
|
+ case CHAMBER: return thermalManager.degTargetChamber();
|
|
234
|
+ #endif
|
|
235
|
+ default: return thermalManager.degTargetHotend(heater - H0);
|
|
236
|
+ }
|
220
|
237
|
}
|
221
|
238
|
|
222
|
239
|
float getTargetTemp_celsius(const extruder_t extruder) {
|
|
@@ -839,7 +856,7 @@ namespace ExtUI {
|
839
|
856
|
}
|
840
|
857
|
|
841
|
858
|
void stopPrint() {
|
842
|
|
- ui.stop_print();
|
|
859
|
+ ui.abort_print();
|
843
|
860
|
}
|
844
|
861
|
|
845
|
862
|
FileList::FileList() { refresh(); }
|