Skip to content

Commit

Permalink
Fix Tune/Fan edit items
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored and kpishere committed Feb 19, 2021
1 parent 3918536 commit 20faa35
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 0 additions & 10 deletions Marlin/src/lcd/menu/menu_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,14 +479,4 @@ class MenuItem_bool : public MenuEditItemBase {

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

#if SNFAN(1) || SNFAN(2) || SNFAN(3) || SNFAN(4) || SNFAN(5) || SNFAN(6) || SNFAN(7)
#define DEFINE_SINGLENOZZLE_ITEM() \
auto singlenozzle_item = [&](const uint8_t f) { \
editable.uint8 = singlenozzle_fan_speed[f]; \
EDIT_ITEM_FAST_N(percent, f, MSG_STORED_FAN_N, &editable.uint8, 0, 255, on_fan_update); \
}
#else
#define DEFINE_SINGLENOZZLE_ITEM() NOOP
#endif

#endif // HAS_FAN
7 changes: 6 additions & 1 deletion Marlin/src/lcd/menu/menu_temperature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@ void menu_temperature() {
//
#if HAS_FAN

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

#if HAS_FAN0
_FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED);
Expand Down
7 changes: 6 additions & 1 deletion Marlin/src/lcd/menu/menu_tune.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ void menu_tune() {
//
#if HAS_FAN

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

#if HAS_FAN0
_FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED);
Expand Down

0 comments on commit 20faa35

Please sign in to comment.