From c58c5b09ab48b059607b4146e162cc0babd60e62 Mon Sep 17 00:00:00 2001 From: John Lagonikas <39417467+zeleps@users.noreply.github.com> Date: Mon, 18 Apr 2022 07:56:52 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20MPC=20compile=20(#24049)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #23984, #23751 Co-authored-by: Scott Lahteine --- Marlin/src/gcode/temp/M306.cpp | 4 +++- Marlin/src/lcd/menu/menu_advanced.cpp | 2 +- buildroot/tests/BIGTREE_GTR_V1_0 | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Marlin/src/gcode/temp/M306.cpp b/Marlin/src/gcode/temp/M306.cpp index 307972eec1..0f286e73b2 100644 --- a/Marlin/src/gcode/temp/M306.cpp +++ b/Marlin/src/gcode/temp/M306.cpp @@ -69,7 +69,9 @@ void GcodeSuite::M306_report(const bool forReplay/*=true*/) { SERIAL_ECHOPAIR_F(" C", constants.block_heat_capacity, 2); SERIAL_ECHOPAIR_F(" R", constants.sensor_responsiveness, 4); SERIAL_ECHOPAIR_F(" A", constants.ambient_xfer_coeff_fan0, 4); - SERIAL_ECHOLNPAIR_F(" F", constants.ambient_xfer_coeff_fan0 + constants.fan255_adjustment, 4); + #if ENABLED(MPC_INCLUDE_FAN) + SERIAL_ECHOLNPAIR_F(" F", constants.ambient_xfer_coeff_fan0 + constants.fan255_adjustment, 4); + #endif } } diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index ab6ac279e0..f78b8a9f68 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -366,7 +366,7 @@ void menu_backlash(); 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 diff --git a/buildroot/tests/BIGTREE_GTR_V1_0 b/buildroot/tests/BIGTREE_GTR_V1_0 index 4d3ac49c98..93342ed4a4 100755 --- a/buildroot/tests/BIGTREE_GTR_V1_0 +++ b/buildroot/tests/BIGTREE_GTR_V1_0 @@ -38,7 +38,7 @@ opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \ MPC_SENSOR_RESPONSIVENESS '{ 0.22f, 0.22f, 0.22f }' \ MPC_AMBIENT_XFER_COEFF '{ 0.068f, 0.068f, 0.068f }' \ MPC_AMBIENT_XFER_COEFF_FAN255 '{ 0.097f, 0.097f, 0.097f }' -opt_enable SWITCHING_TOOLHEAD TOOL_SENSOR MPCTEMP +opt_enable SWITCHING_TOOLHEAD TOOL_SENSOR MPCTEMP MPC_EDIT_MENU MPC_AUTOTUNE_MENU opt_disable PIDTEMP exec_test $1 $2 "BigTreeTech GTR | MPC | Switching Toolhead | Tool Sensors" "$3"