Skip to content

Commit

Permalink
Hide menu item with no fan (#18470)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellensp authored Jul 1, 2020
1 parent 992dc14 commit d7e0619
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Marlin/src/lcd/menu/menu_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,10 @@ void menu_advanced_settings();
#define MAXTEMP_ALL _MAX(REPEAT(HOTENDS, _MAXTEMP_ITEM) 0)
START_MENU();
BACK_ITEM(MSG_CONFIGURATION);
editable.uint8 = uint8_t(ui.material_preset[m].fan_speed);
EDIT_ITEM_N(percent, m, MSG_FAN_SPEED, &editable.uint8, 0, 255, []{ ui.material_preset[MenuItemBase::itemIndex].fan_speed = editable.uint8; });
#if HAS_FAN
editable.uint8 = uint8_t(ui.material_preset[m].fan_speed);
EDIT_ITEM_N(percent, m, MSG_FAN_SPEED, &editable.uint8, 0, 255, []{ ui.material_preset[MenuItemBase::itemIndex].fan_speed = editable.uint8; });
#endif
#if HAS_TEMP_HOTEND
EDIT_ITEM(uint16_3, MSG_NOZZLE, &ui.material_preset[m].hotend_temp, MINTEMP_ALL, MAXTEMP_ALL - HOTEND_OVERSHOOT);
#endif
Expand Down

0 comments on commit d7e0619

Please sign in to comment.