Skip to content

Commit 20faa35

Browse files
thinkyheadkpishere
authored andcommitted
Fix Tune/Fan edit items
- Fixes MarlinFirmware#19617 - Followup to MarlinFirmware#18400
1 parent 3918536 commit 20faa35

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

Marlin/src/lcd/menu/menu_item.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -479,14 +479,4 @@ class MenuItem_bool : public MenuEditItemBase {
479479

480480
#define SNFAN(N) (ENABLED(SINGLENOZZLE_STANDBY_FAN) && !HAS_FAN##N && EXTRUDERS > N)
481481

482-
#if SNFAN(1) || SNFAN(2) || SNFAN(3) || SNFAN(4) || SNFAN(5) || SNFAN(6) || SNFAN(7)
483-
#define DEFINE_SINGLENOZZLE_ITEM() \
484-
auto singlenozzle_item = [&](const uint8_t f) { \
485-
editable.uint8 = singlenozzle_fan_speed[f]; \
486-
EDIT_ITEM_FAST_N(percent, f, MSG_STORED_FAN_N, &editable.uint8, 0, 255, on_fan_update); \
487-
}
488-
#else
489-
#define DEFINE_SINGLENOZZLE_ITEM() NOOP
490-
#endif
491-
492482
#endif // HAS_FAN

Marlin/src/lcd/menu/menu_temperature.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,12 @@ void menu_temperature() {
191191
//
192192
#if HAS_FAN
193193

194-
DEFINE_SINGLENOZZLE_ITEM();
194+
#if SNFAN(1) || SNFAN(2) || SNFAN(3) || SNFAN(4) || SNFAN(5) || SNFAN(6) || SNFAN(7)
195+
auto singlenozzle_item = [&](const uint8_t f) {
196+
editable.uint8 = singlenozzle_fan_speed[f];
197+
EDIT_ITEM_FAST_N(percent, f, MSG_STORED_FAN_N, &editable.uint8, 0, 255, on_fan_update);
198+
};
199+
#endif
195200

196201
#if HAS_FAN0
197202
_FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED);

Marlin/src/lcd/menu/menu_tune.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@ void menu_tune() {
142142
//
143143
#if HAS_FAN
144144

145-
DEFINE_SINGLENOZZLE_ITEM();
145+
#if SNFAN(1) || SNFAN(2) || SNFAN(3) || SNFAN(4) || SNFAN(5) || SNFAN(6) || SNFAN(7)
146+
auto singlenozzle_item = [&](const uint8_t f) {
147+
editable.uint8 = singlenozzle_fan_speed[f];
148+
EDIT_ITEM_FAST_N(percent, f, MSG_STORED_FAN_N, &editable.uint8, 0, 255, on_fan_update);
149+
};
150+
#endif
146151

147152
#if HAS_FAN0
148153
_FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED);

0 commit comments

Comments
 (0)