@@ -1330,75 +1330,54 @@ void Endstops::update() {
1330
1330
bool hit = false ;
1331
1331
#if X_SPI_SENSORLESS
1332
1332
if (tmc_spi_homing.x && (stepperX.test_stall_status ()
1333
- #if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) && Y_SPI_SENSORLESS
1333
+ #if Y_SPI_SENSORLESS && ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
1334
1334
|| stepperY.test_stall_status ()
1335
- #elif CORE_IS_XZ && Z_SPI_SENSORLESS
1335
+ #elif Z_SPI_SENSORLESS && CORE_IS_XZ
1336
1336
|| stepperZ.test_stall_status ()
1337
1337
#endif
1338
- )) {
1339
- SBI (live_state, X_ENDSTOP);
1340
- hit = true ;
1341
- }
1338
+ )) { SBI (live_state, X_ENDSTOP); hit = true ; }
1339
+ # if ENABLED(X_DUAL_ENDSTOPS)
1340
+ if (tmc_spi_homing. x && stepperX2. test_stall_status ()) { SBI (live_state, X2_ENDSTOP); hit = true ; }
1341
+ # endif
1342
1342
#endif
1343
1343
#if Y_SPI_SENSORLESS
1344
1344
if (tmc_spi_homing.y && (stepperY.test_stall_status ()
1345
- #if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX) && X_SPI_SENSORLESS
1345
+ #if X_SPI_SENSORLESS && ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
1346
1346
|| stepperX.test_stall_status ()
1347
- #elif CORE_IS_YZ && Z_SPI_SENSORLESS
1347
+ #elif Z_SPI_SENSORLESS && CORE_IS_YZ
1348
1348
|| stepperZ.test_stall_status ()
1349
1349
#endif
1350
- )) {
1351
- SBI (live_state, Y_ENDSTOP);
1352
- hit = true ;
1353
- }
1350
+ )) { SBI (live_state, Y_ENDSTOP); hit = true ; }
1351
+ # if ENABLED(Y_DUAL_ENDSTOPS)
1352
+ if (tmc_spi_homing. y && stepperY2. test_stall_status ()) { SBI (live_state, Y2_ENDSTOP); hit = true ; }
1353
+ # endif
1354
1354
#endif
1355
1355
#if Z_SPI_SENSORLESS
1356
1356
if (tmc_spi_homing.z && (stepperZ.test_stall_status ()
1357
- #if CORE_IS_XZ && X_SPI_SENSORLESS
1357
+ #if X_SPI_SENSORLESS && CORE_IS_XZ
1358
1358
|| stepperX.test_stall_status ()
1359
- #elif CORE_IS_YZ && Y_SPI_SENSORLESS
1359
+ #elif Y_SPI_SENSORLESS && CORE_IS_YZ
1360
1360
|| stepperY.test_stall_status ()
1361
1361
#endif
1362
- )) {
1363
- SBI (live_state, Z_ENDSTOP);
1364
- hit = true ;
1365
- }
1362
+ )) { SBI (live_state, Z_ENDSTOP); hit = true ; }
1366
1363
#endif
1367
1364
#if I_SPI_SENSORLESS
1368
- if (tmc_spi_homing.i && stepperI.test_stall_status ()) {
1369
- SBI (live_state, I_ENDSTOP);
1370
- hit = true ;
1371
- }
1365
+ if (tmc_spi_homing.i && stepperI.test_stall_status ()) { SBI (live_state, I_ENDSTOP); hit = true ; }
1372
1366
#endif
1373
1367
#if J_SPI_SENSORLESS
1374
- if (tmc_spi_homing.j && stepperJ.test_stall_status ()) {
1375
- SBI (live_state, J_ENDSTOP);
1376
- hit = true ;
1377
- }
1368
+ if (tmc_spi_homing.j && stepperJ.test_stall_status ()) { SBI (live_state, J_ENDSTOP); hit = true ; }
1378
1369
#endif
1379
1370
#if K_SPI_SENSORLESS
1380
- if (tmc_spi_homing.k && stepperK.test_stall_status ()) {
1381
- SBI (live_state, K_ENDSTOP);
1382
- hit = true ;
1383
- }
1371
+ if (tmc_spi_homing.k && stepperK.test_stall_status ()) { SBI (live_state, K_ENDSTOP); hit = true ; }
1384
1372
#endif
1385
1373
#if U_SPI_SENSORLESS
1386
- if (tmc_spi_homing.u && stepperU.test_stall_status ()) {
1387
- SBI (live_state, U_ENDSTOP);
1388
- hit = true ;
1389
- }
1374
+ if (tmc_spi_homing.u && stepperU.test_stall_status ()) { SBI (live_state, U_ENDSTOP); hit = true ; }
1390
1375
#endif
1391
1376
#if V_SPI_SENSORLESS
1392
- if (tmc_spi_homing.v && stepperV.test_stall_status ()) {
1393
- SBI (live_state, V_ENDSTOP);
1394
- hit = true ;
1395
- }
1377
+ if (tmc_spi_homing.v && stepperV.test_stall_status ()) { SBI (live_state, V_ENDSTOP); hit = true ; }
1396
1378
#endif
1397
1379
#if W_SPI_SENSORLESS
1398
- if (tmc_spi_homing.w && stepperW.test_stall_status ()) {
1399
- SBI (live_state, W_ENDSTOP);
1400
- hit = true ;
1401
- }
1380
+ if (tmc_spi_homing.w && stepperW.test_stall_status ()) { SBI (live_state, W_ENDSTOP); hit = true ; }
1402
1381
#endif
1403
1382
1404
1383
if (TERN0 (ENDSTOP_INTERRUPTS_FEATURE, hit)) update ();
@@ -1408,7 +1387,13 @@ void Endstops::update() {
1408
1387
1409
1388
void Endstops::clear_endstop_state () {
1410
1389
TERN_ (X_SPI_SENSORLESS, CBI (live_state, X_ENDSTOP));
1390
+ #if BOTH(X_SPI_SENSORLESS, X_DUAL_ENDSTOPS)
1391
+ CBI (live_state, X2_ENDSTOP);
1392
+ #endif
1411
1393
TERN_ (Y_SPI_SENSORLESS, CBI (live_state, Y_ENDSTOP));
1394
+ #if BOTH(Y_SPI_SENSORLESS, Y_DUAL_ENDSTOPS)
1395
+ CBI (live_state, Y2_ENDSTOP);
1396
+ #endif
1412
1397
TERN_ (Z_SPI_SENSORLESS, CBI (live_state, Z_ENDSTOP));
1413
1398
TERN_ (I_SPI_SENSORLESS, CBI (live_state, I_ENDSTOP));
1414
1399
TERN_ (J_SPI_SENSORLESS, CBI (live_state, J_ENDSTOP));
0 commit comments