ExtUI Heated Chamber support (#14198)

This commit is contained in:
InsanityAutomation 2019-06-07 08:08:41 -04:00 committed by Scott Lahteine
parent fda8606388
commit 66e22d9f5a
4 changed files with 44 additions and 25 deletions

View File

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

View File

@ -54,7 +54,7 @@ namespace ExtUI {
enum axis_t : uint8_t { X, Y, Z };
enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5 };
enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED };
enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER };
enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5 };
constexpr uint8_t extruderCount = EXTRUDERS;

View File

@ -1380,7 +1380,9 @@ void MarlinUI::update() {
}
void MarlinUI::pause_print() {
#if HAS_LCD_MENU
synchronize(PSTR(MSG_PAUSE_PRINT));
#endif
#if ENABLED(POWER_LOSS_RECOVERY)
if (recovery.enabled) recovery.save(true, false);

View File

@ -7,7 +7,7 @@
set -e
restore_configs
opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB
opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB EXTENSIBLE_UI EXTUI_EXAMPLE
opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS
opt_set E0_AUTO_FAN_PIN 8
opt_set EXTRUDER_AUTO_FAN_SPEED 100