 }
 
 void loop() {
+  
+  // Reset states
+  reset_states();
 
   // Check for IR commands
   if (My_Receiver.GetResults (&My_Decoder)) {

      break;
    
    case 0x42505f87:
      set_state_bit (true, GM_CMD_MOVE_W, &state);
      // left 
      break;
    }


  }
}

void reset_states(){
  set_state_bit (false, GM_CMD_GRAB, &state);
  set_state_bit (false, GM_CMD_MOVE_N, &state);
  set_state_bit (false, GM_CMD_MOVE_W, &state);
  set_state_bit (false, GM_CMD_MOVE_S, &state);
  set_state_bit (false, GM_CMD_MOVE_E, &state);
}
