State machine comparision

enum states{
   STATE_BEGIN_INPUT,
   STATE_GETTING_ROTATION, 
   STATE_GETTING_SPEED, 
   STATE_OUTPUT_RS
};