No false alarm if other bits in port are set.

This commit is contained in:
ashelly 2014-09-17 23:41:52 -04:00
parent 4f68edbba2
commit 5b97a79b6d

View File

@ -242,7 +242,7 @@ void mc_homing_cycle()
{
uint8_t limits_on;
if (bit_istrue(settings.flags,BITFLAG_INVERT_LIMIT_PINS)) {
limits_on = (LIMIT_PIN ^ LIMIT_MASK);
limits_on = ((~LIMIT_PIN) & LIMIT_MASK);
} else {
limits_on = (LIMIT_PIN & LIMIT_MASK);
}