I think I would have written as discrete compares:
if ( (Sw[6]==2) || (Sw[0] ==2) ||(TF == 2) ) {return;}