|
@ -170,12 +170,17 @@ namespace ExtUI { |
|
|
|
|
|
|
|
|
void enableHeater(const heater_t heater) { |
|
|
void enableHeater(const heater_t heater) { |
|
|
#if HEATER_IDLE_HANDLER |
|
|
#if HEATER_IDLE_HANDLER |
|
|
#if HAS_HEATED_BED |
|
|
switch (heater) { |
|
|
if (heater == BED) |
|
|
#if HAS_HEATED_BED |
|
|
thermalManager.reset_bed_idle_timer(); |
|
|
case BED: |
|
|
else |
|
|
thermalManager.reset_bed_idle_timer(); |
|
|
#endif |
|
|
return; |
|
|
thermalManager.reset_heater_idle_timer(heater - H0); |
|
|
#endif |
|
|
|
|
|
#if HAS_HEATED_CHAMBER |
|
|
|
|
|
case CHAMBER: return; // Chamber has no idle timer
|
|
|
|
|
|
#endif |
|
|
|
|
|
default: thermalManager.reset_heater_idle_timer(heater - H0); |
|
|
|
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -188,23 +193,31 @@ namespace ExtUI { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool isHeaterIdle(const heater_t heater) { |
|
|
bool isHeaterIdle(const heater_t heater) { |
|
|
return (false |
|
|
#if HEATER_IDLE_HANDLER |
|
|
#if HEATER_IDLE_HANDLER |
|
|
switch (heater) { |
|
|
|| (heater == BED ? (false |
|
|
#if HAS_HEATED_BED |
|
|
#if HAS_HEATED_BED |
|
|
case BED: return thermalManager.bed_idle.timed_out; |
|
|
|| thermalManager.bed_idle.timed_out |
|
|
#endif |
|
|
#endif |
|
|
#if HAS_HEATED_CHAMBER |
|
|
) : thermalManager.hotend_idle[heater - H0].timed_out) |
|
|
case CHAMBER: return false; // Chamber has no idle timer
|
|
|
#endif |
|
|
#endif |
|
|
); |
|
|
default: return thermalManager.hotend_idle[heater - H0].timed_out; |
|
|
|
|
|
} |
|
|
|
|
|
#else |
|
|
|
|
|
return false; |
|
|
|
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float getActualTemp_celsius(const heater_t heater) { |
|
|
float getActualTemp_celsius(const heater_t heater) { |
|
|
return heater == BED ? (0 |
|
|
switch (heater) { |
|
|
#if HAS_HEATED_BED |
|
|
#if HAS_HEATED_BED |
|
|
+ thermalManager.degBed() |
|
|
case BED: return thermalManager.degBed(); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if HAS_HEATED_CHAMBER |
|
|
|
|
|
case CHAMBER: return thermalManager.degChamber(); |
|
|
#endif |
|
|
#endif |
|
|
) : thermalManager.degHotend(heater - H0); |
|
|
default: return thermalManager.degHotend(heater - H0); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float getActualTemp_celsius(const extruder_t extruder) { |
|
|
float getActualTemp_celsius(const extruder_t extruder) { |
|
@ -212,11 +225,15 @@ namespace ExtUI { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float getTargetTemp_celsius(const heater_t heater) { |
|
|
float getTargetTemp_celsius(const heater_t heater) { |
|
|
return heater == BED ? (0 |
|
|
switch (heater) { |
|
|
#if HAS_HEATED_BED |
|
|
#if HAS_HEATED_BED |
|
|
+ thermalManager.degTargetBed() |
|
|
case BED: return thermalManager.degTargetBed(); |
|
|
#endif |
|
|
#endif |
|
|
) : thermalManager.degTargetHotend(heater - H0); |
|
|
#if HAS_HEATED_CHAMBER |
|
|
|
|
|
case CHAMBER: return thermalManager.degTargetChamber(); |
|
|
|
|
|
#endif |
|
|
|
|
|
default: return thermalManager.degTargetHotend(heater - H0); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float getTargetTemp_celsius(const extruder_t extruder) { |
|
|
float getTargetTemp_celsius(const extruder_t extruder) { |
|
@ -839,7 +856,7 @@ namespace ExtUI { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void stopPrint() { |
|
|
void stopPrint() { |
|
|
ui.stop_print(); |
|
|
ui.abort_print(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
FileList::FileList() { refresh(); } |
|
|
FileList::FileList() { refresh(); } |
|
|