Program does not go into the switch statements at all !

In the if-else-if-else-if in loop in the end device the first two tests are exhaustive so the third arm
can never happen.