Here is the code I’m looking at:
bool MeLimitSwitch::touched()
{
if(getSlot()==DEV2){
pinMode(s1,INPUT_PULLUP);
}else{
pinMode(s2,INPUT_PULLUP);
}
return getSlot()==DEV2?digitalRead(s1):digitalRead(s2);
}
My question is why is DEV1 mapped to s2 and DEV2 mapped to s1? This seems backwards.