Skip to content

Commit

Permalink
🩹 Fix MPC Edit Menu (MarlinFirmware#24059)
Browse files Browse the repository at this point in the history
Followup to MarlinFirmware#23984

Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
2 people authored and LCh-77 committed May 11, 2022
1 parent 80c090b commit 5fba3e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Marlin/src/lcd/menu/menu_advanced.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,21 +352,22 @@ void menu_backlash();
#define MPC_EDIT_ITEMS(N) \
_MPC_EDIT_ITEMS(N); \
EDIT_ITEM_FAST_N(float43, N, MSG_MPC_AMBIENT_XFER_COEFF_FAN_E, &editable.decimal, 0, 1, []{ \
MPC_t &c = thermalManager.temp_hotend[MenuItemBase::itemIndex].constants; \
c.fan255_adjustment = editable.decimal - c.ambient_xfer_coeff_fan0; \
})
#else
#define MPC_EDIT_ITEMS _MPC_EDIT_ITEMS
#endif

#if HAS_MULTI_HOTEND
auto mpc_edit_hotend = [&](const uint8_t e) {
static auto mpc_edit_hotend = [](const uint8_t e) {
MPC_EDIT_DEFS(e);
START_MENU();
BACK_ITEM(MSG_TEMPERATURE);
MPC_EDIT_ITEMS(e);
END_MENU();
};
#define MPC_ENTRY(N) SUBMENU_N(N, MSG_MPC_EDIT, [&]{ mpc_edit_hotend(MenuItemBase::itemIndex); });
#define MPC_ENTRY(N) SUBMENU_N(N, MSG_MPC_EDIT, []{ mpc_edit_hotend(MenuItemBase::itemIndex); });
#else
#define MPC_ENTRY MPC_EDIT_ITEMS
#endif
Expand Down

0 comments on commit 5fba3e0

Please sign in to comment.