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 <thinkyhead@users.noreply.github.com>
  • Loading branch information
2 people authored and LCh-77 committed May 11, 2022
1 parent 8a1e4a4 commit cf56768
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Marlin/src/lcd/menu/menu_advanced.cpp
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 cf56768

Please sign in to comment.