Browse Source

ExtUI Heated Chamber support (#14198)

pull/1/head
InsanityAutomation 6 years ago
committed by Scott Lahteine
parent
commit
66e22d9f5a
  1. 47
      Marlin/src/lcd/extensible_ui/ui_api.cpp
  2. 2
      Marlin/src/lcd/extensible_ui/ui_api.h
  3. 2
      Marlin/src/lcd/ultralcd.cpp
  4. 2
      buildroot/share/tests/DUE-tests

47
Marlin/src/lcd/extensible_ui/ui_api.cpp

@ -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
#if HAS_HEATED_CHAMBER
case CHAMBER: return; // Chamber has no idle timer
#endif #endif
thermalManager.reset_heater_idle_timer(heater - H0); 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
#if HAS_HEATED_CHAMBER
case CHAMBER: return false; // Chamber has no idle timer
#endif #endif
) : thermalManager.hotend_idle[heater - H0].timed_out) 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
#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
#if HAS_HEATED_CHAMBER
case CHAMBER: return thermalManager.degTargetChamber();
#endif #endif
) : thermalManager.degTargetHotend(heater - H0); 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(); }

2
Marlin/src/lcd/extensible_ui/ui_api.h

@ -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;

2
Marlin/src/lcd/ultralcd.cpp

@ -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);

2
buildroot/share/tests/DUE-tests

@ -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

Loading…
Cancel
Save