From 644c376e8480248879637674f09b900ce95131ca Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 13 Oct 2015 03:59:43 -0700 Subject: [PATCH] Use binary OR with endstop bits --- Marlin/stepper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 8fce7386b8..327b6449af 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -399,7 +399,7 @@ inline void update_endstops() { COPY_BIT(current_endstop_bits, Z_MIN, Z2_MIN); #endif - byte z_test = TEST_ENDSTOP(Z_MIN) << 0 + TEST_ENDSTOP(Z2_MIN) << 1; // bit 0 for Z, bit 1 for Z2 + byte z_test = TEST_ENDSTOP(Z_MIN) | (TEST_ENDSTOP(Z2_MIN) << 1); // bit 0 for Z, bit 1 for Z2 if (z_test && current_block->steps[Z_AXIS] > 0) { // z_test = Z_MIN || Z2_MIN endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS]; @@ -435,7 +435,7 @@ inline void update_endstops() { COPY_BIT(current_endstop_bits, Z_MAX, Z2_MAX); #endif - byte z_test = TEST_ENDSTOP(Z_MAX) << 0 + TEST_ENDSTOP(Z2_MAX) << 1; // bit 0 for Z, bit 1 for Z2 + byte z_test = TEST_ENDSTOP(Z_MAX) | (TEST_ENDSTOP(Z2_MAX) << 1); // bit 0 for Z, bit 1 for Z2 if (z_test && current_block->steps[Z_AXIS] > 0) { // t_test = Z_MAX || Z2_MAX endstops_trigsteps[Z_AXIS] = count_position[Z_AXIS];