Skip to content

Commit 591fa8b

Browse files
authored
🔧 Sanity-check SWITCHING_TOOLHEAD_X_POS (MarlinFirmware#23985)
1 parent f7fff4d commit 591fa8b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Marlin/src/inc/SanityCheck.h

+8
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,14 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
13151315
#endif
13161316
#endif
13171317

1318+
/**
1319+
* Generic Switching Toolhead requirements
1320+
*/
1321+
#if ANY(SWITCHING_TOOLHEAD, MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD)
1322+
constexpr float thpx[] = SWITCHING_TOOLHEAD_X_POS;
1323+
static_assert(COUNT(thpx) == EXTRUDERS, "SWITCHING_TOOLHEAD_X_POS must be an array EXTRUDERS long.");
1324+
#endif
1325+
13181326
/**
13191327
* Switching Toolhead requirements
13201328
*/

buildroot/tests/BIGTREE_GTR_V1_0

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ exec_test $1 $2 "BigTreeTech GTR | 6 Extruders | Quad Z + Endstops" "$3"
3131
restore_configs
3232
opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \
3333
EXTRUDERS 3 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 \
34-
SERVO_DELAY '{ 300, 300, 300 }'
34+
SERVO_DELAY '{ 300, 300, 300 }' \
35+
SWITCHING_TOOLHEAD_X_POS '{ 215, 0 ,0 }'
3536
opt_enable SWITCHING_TOOLHEAD TOOL_SENSOR
3637
exec_test $1 $2 "BigTreeTech GTR | Switching Toolhead | Tool Sensors" "$3"
3738

0 commit comments

Comments
 (0)