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) { void enableHeater(const heater_t heater) {
#if HEATER_IDLE_HANDLER #if HEATER_IDLE_HANDLER
switch (heater) {
#if HAS_HEATED_BED #if HAS_HEATED_BED
if (heater == BED) case BED:
thermalManager.reset_bed_idle_timer(); thermalManager.reset_bed_idle_timer();
else return;
#endif #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 #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
|| (heater == BED ? (false switch (heater) {
#if HAS_HEATED_BED #if HAS_HEATED_BED
|| thermalManager.bed_idle.timed_out case BED: return thermalManager.bed_idle.timed_out;
#endif #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 #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 #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) { 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(); }

View File

@ -54,7 +54,7 @@ namespace ExtUI {
enum axis_t : uint8_t { X, Y, Z }; enum axis_t : uint8_t { X, Y, Z };
enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5 }; 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 }; enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5 };
constexpr uint8_t extruderCount = EXTRUDERS; constexpr uint8_t extruderCount = EXTRUDERS;

View File

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

View File

@ -7,7 +7,7 @@
set -e set -e
restore_configs 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_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS
opt_set E0_AUTO_FAN_PIN 8 opt_set E0_AUTO_FAN_PIN 8
opt_set EXTRUDER_AUTO_FAN_SPEED 100 opt_set EXTRUDER_AUTO_FAN_SPEED 100