diff --git a/Grbl_Esp32/src/Limits.cpp b/Grbl_Esp32/src/Limits.cpp index dd8c722d..6c99bf1f 100644 --- a/Grbl_Esp32/src/Limits.cpp +++ b/Grbl_Esp32/src/Limits.cpp @@ -442,7 +442,7 @@ void limits_init() { // Return a mask of the switches that are engaged. AxisMask limits_check(AxisMask check_mask) { // Expand the bitmask to include both gangs - bit_true(check_mask, check_mask << 16); + set_bits(check_mask, check_mask << 16); return (Machine::Axes::posLimitMask | Machine::Axes::negLimitMask) & check_mask; } diff --git a/Grbl_Esp32/src/Machine/LimitPin.cpp b/Grbl_Esp32/src/Machine/LimitPin.cpp index 892f45ef..ee924869 100644 --- a/Grbl_Esp32/src/Machine/LimitPin.cpp +++ b/Grbl_Esp32/src/Machine/LimitPin.cpp @@ -64,10 +64,10 @@ namespace Machine { _value = _pin.read(); if (_value) { if (_posLimits != nullptr) { - bit_true(*_posLimits, _bitmask); + set_bits(*_posLimits, _bitmask); } if (_negLimits != nullptr) { - bit_true(*_negLimits, _bitmask); + set_bits(*_negLimits, _bitmask); } } else { if (_posLimits != nullptr) { diff --git a/Grbl_Esp32/src/NutsBolts.h b/Grbl_Esp32/src/NutsBolts.h index f497e809..6d886678 100644 --- a/Grbl_Esp32/src/NutsBolts.h +++ b/Grbl_Esp32/src/NutsBolts.h @@ -81,7 +81,7 @@ const float INCH_PER_MM = (0.0393701f); #endif #define bit(n) (1 << static_cast(n)) -#define bit_true(target, mask) (target) |= (mask) +#define set_bits(target, mask) (target) |= (mask) #define clear_bits(target, mask) (target) &= ~(mask) #define bits_are_true(target, mask) ((target & mask) != 0) #define bits_are_false(target, mask) ((target & mask) == 0)