Shared singlenozzle item
This commit is contained in:
parent
770f2b1e02
commit
2a755d68d9
|
@ -479,4 +479,14 @@ 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
|
||||
|
|
|
@ -191,12 +191,7 @@ void menu_temperature() {
|
|||
//
|
||||
#if HAS_FAN
|
||||
|
||||
#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
|
||||
DEFINE_SINGLENOZZLE_ITEM();
|
||||
|
||||
#if HAS_FAN0
|
||||
_FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED);
|
||||
|
|
|
@ -142,12 +142,7 @@ void menu_tune() {
|
|||
//
|
||||
#if HAS_FAN
|
||||
|
||||
#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
|
||||
DEFINE_SINGLENOZZLE_ITEM();
|
||||
|
||||
#if HAS_FAN0
|
||||
_FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED);
|
||||
|
|
Loading…
Reference in a new issue