public void receiveEvent(final String data) {
          SetBusyEvent();
          deleteEEPROM();

          if (selectedConsole == null) {
            selectedConsole = consoles.get(0);
            OutputConsole(selectedConsole);
            SetReadyEvent();
            return;
          }

          int index = consoles.indexOf(selectedConsole);

          if (index < 0) {
            selectedConsole = consoles.get(0);
            OutputConsole(selectedConsole);
            SetReadyEvent();
            return;
          }

          if ((consoles.size() - 1) >= (index + 1)) {
            if (consoles.get(index + 1) != null) {
              selectedConsole = consoles.get(index + 1);

              // setMode(consoles.get(index+1),
              // games.get(index+1).get(0));
            }
          } else if (consoles.get(0) != null) {
            selectedConsole = consoles.get(0);
            // setMode(consoles.get(0), games.get(consoles.get(0)).get(0));
          }

          OutputConsole(selectedConsole);
          opOutGame.sendData(ConversionUtils.stringToBytes(""));
          opOutMode.sendData(ConversionUtils.stringToBytes(""));
          SetReadyEvent();

          loadNewModel(selectedConsole);
        }
  public void ShowButtons(int modeToLoad) {
    String buttons = "";
    ArrayList<ArrayList<String>> eachMode;
    Map<String, ArrayList<ArrayList<String>>> gameMode;

    gameMode = modes.get(selectedConsole.toUpperCase());
    eachMode = gameMode.get(selectedGame.toUpperCase());

    ArrayList<String> mode = eachMode.get(modeToLoad - 1);
    for (String config : mode) {
      if (config.contains("KEY_CTRL KEY_ESC")) {
        config = "Modus/Zurueck";
      } else if (config.contains("KEY_")) {
        config = config.replace("KEY_", "");
      }
      buttons += config + ",";
    }
    System.out.println("Buttons : " + buttons);
    opOutButtons.sendData(ConversionUtils.stringToBytes(buttons));
  }
 public void OutputMode(int text) {
   System.out.print(
       "################################################################################");
   System.out.println("Load Mode " + text);
   opOutMode.sendData(toByteArray(text));
 }
 public void loadNewModel(String model) {
   opOutModel.sendData(ConversionUtils.stringToBytes(model + ".acs"));
   etploadModel.raiseEvent();
 }
 public void OutputGame(String text) {
   System.out.print(
       "################################################################################");
   System.out.println("Load Game " + text);
   opOutGame.sendData(ConversionUtils.stringToBytes(text));
 }