From cbc6f23a8af0c864e3607dc24764582149c0d1f3 Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon, 4 Apr 2022 01:49:51 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Sanity-check=20SWITCHING=5FTOOLH?= =?UTF-8?q?EAD=5FX=5FPOS=20(#23985)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/inc/SanityCheck.h | 8 ++++++++ buildroot/tests/BIGTREE_GTR_V1_0 | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index f9b6d8da4e..c60c792d36 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1301,6 +1301,14 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #endif +/** + * Generic Switching Toolhead requirements + */ +#if ANY(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + constexpr float thpx[] = SWITCHING_TOOLHEAD_X_POS; + static_assert(COUNT(thpx) == EXTRUDERS, "SWITCHING_TOOLHEAD_X_POS must be an array EXTRUDERS long."); +#endif + /** * Switching Toolhead requirements */ diff --git a/buildroot/tests/BIGTREE_GTR_V1_0 b/buildroot/tests/BIGTREE_GTR_V1_0 index 0a80a6b78c..4f1a4a690a 100755 --- a/buildroot/tests/BIGTREE_GTR_V1_0 +++ b/buildroot/tests/BIGTREE_GTR_V1_0 @@ -31,7 +31,8 @@ exec_test $1 $2 "BigTreeTech GTR | 6 Extruders | Quad Z + Endstops" "$3" restore_configs opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \ EXTRUDERS 3 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 \ - SERVO_DELAY '{ 300, 300, 300 }' + SERVO_DELAY '{ 300, 300, 300 }' \ + SWITCHING_TOOLHEAD_X_POS '{ 215, 0 ,0 }' opt_enable SWITCHING_TOOLHEAD TOOL_SENSOR exec_test $1 $2 "BigTreeTech GTR | Switching Toolhead | Tool Sensors" "$3"