🩹 Fix MPC Edit Menu (#24059)

Followup to #23984

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
tombrazier 2022-04-22 07:50:38 +01:00 committed by GitHub
parent 633fb5f941
commit 5b2071448f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -352,6 +352,7 @@ 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
@ -359,14 +360,14 @@ void menu_backlash();
#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