From e81b946f0640494a946220e11fba50a4626720d8 Mon Sep 17 00:00:00 2001 From: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Wed, 20 Nov 2019 01:14:56 -0500 Subject: [PATCH] Better singlenozzle stored fan speed menus (#15921) --- Marlin/src/lcd/language/language_en.h | 1 + Marlin/src/lcd/menu/menu_temperature.cpp | 6 ++++++ Marlin/src/lcd/menu/menu_tune.cpp | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 3001fc62c9..0f41726a94 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -249,6 +249,7 @@ namespace Language_en { PROGMEM Language_Str MSG_CHAMBER = _UxGT("Enclosure"); PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Fan Speed"); PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Fan Speed ="); + PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Stored Fan ="); PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra Fan Speed"); PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra Fan Speed ="); PROGMEM Language_Str MSG_FLOW = _UxGT("Flow"); diff --git a/Marlin/src/lcd/menu/menu_temperature.cpp b/Marlin/src/lcd/menu/menu_temperature.cpp index 5f2cbc4261..0c90a88753 100644 --- a/Marlin/src/lcd/menu/menu_temperature.cpp +++ b/Marlin/src/lcd/menu/menu_temperature.cpp @@ -211,6 +211,9 @@ void menu_temperature() { #if ENABLED(EXTRA_FAN_SPEED) EDIT_ITEM_FAST_N(percent, 2, MSG_EXTRA_FAN_SPEED_N, &thermalManager.new_fan_speed[1], 3, 255); #endif + #elif ENABLED(SINGLENOZZLE) && EXTRUDERS > 1 + editable.uint8 = thermalManager.fan_speed[1]; + EDIT_ITEM_FAST_N(percent, 2, MSG_STORED_FAN_N, &editable.uint8, 0, 255, []{ thermalManager.set_fan_speed(1, editable.uint8); }); #endif #if HAS_FAN2 editable.uint8 = thermalManager.fan_speed[2]; @@ -218,6 +221,9 @@ void menu_temperature() { #if ENABLED(EXTRA_FAN_SPEED) EDIT_ITEM_FAST_N(percent, 3, MSG_EXTRA_FAN_SPEED_N, &thermalManager.new_fan_speed[2], 3, 255); #endif + #elif ENABLED(SINGLENOZZLE) && EXTRUDERS > 2 + editable.uint8 = thermalManager.fan_speed[2]; + EDIT_ITEM_FAST_N(percent, 3, MSG_STORED_FAN_N, &editable.uint8, 0, 255, []{ thermalManager.set_fan_speed(2, editable.uint8); }); #endif #endif // FAN_COUNT > 0 diff --git a/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/src/lcd/menu/menu_tune.cpp index d635388f6d..4fba6fe719 100644 --- a/Marlin/src/lcd/menu/menu_tune.cpp +++ b/Marlin/src/lcd/menu/menu_tune.cpp @@ -160,6 +160,9 @@ void menu_tune() { #if ENABLED(EXTRA_FAN_SPEED) EDIT_ITEM_FAST_N(percent, 2, MSG_EXTRA_FAN_SPEED_N, &thermalManager.new_fan_speed[1], 3, 255); #endif + #elif ENABLED(SINGLENOZZLE) && EXTRUDERS > 1 + editable.uint8 = thermalManager.fan_speed[1]; + EDIT_ITEM_FAST_N(percent, 2, MSG_STORED_FAN_N, &editable.uint8, 0, 255, []{ thermalManager.set_fan_speed(1, editable.uint8); }); #endif #if HAS_FAN2 editable.uint8 = thermalManager.fan_speed[2]; @@ -167,6 +170,9 @@ void menu_tune() { #if ENABLED(EXTRA_FAN_SPEED) EDIT_ITEM_FAST_N(percent, 3, MSG_EXTRA_FAN_SPEED_N, &thermalManager.new_fan_speed[2], 3, 255); #endif + #elif ENABLED(SINGLENOZZLE) && EXTRUDERS > 2 + editable.uint8 = thermalManager.fan_speed[2]; + EDIT_ITEM_FAST_N(percent, 3, MSG_STORED_FAN_N, &editable.uint8, 0, 255, []{ thermalManager.set_fan_speed(2, editable.uint8); }); #endif #endif // FAN_COUNT > 0