@Override
  public void aileronAndElevatorDeadBandValueDidChange(float newValue) {
    JoystickBase rollAndPitchJoyStick = getRollAndPitchJoystick();

    rollAndPitchJoyStick.setXDeadBand(newValue);
    rollAndPitchJoyStick.setYDeadBand(newValue);
  }
  private void initJoysticks(JoystickType rollAndPitchType) {
    JoystickBase rollAndPitchJoystick = getRollAndPitchJoystick();
    JoystickBase rudderAndThrottleJoystick = getRudderAndThrottleJoystick();

    if (rollAndPitchType == JoystickType.ANALOGUE) {
      if (rollAndPitchJoystick == null || !(rollAndPitchJoystick instanceof AnalogueJoystick)) {
        rollAndPitchJoystick =
            JoystickFactory.createAnalogueJoystick(
                this.getContext(), false, rollPitchListener, true);
        rollAndPitchJoystick.setXDeadBand(settings.getAileronDeadBand());
        rollAndPitchJoystick.setYDeadBand(settings.getElevatorDeadBand());
      } else {
        rollAndPitchJoystick.setOnAnalogueChangedListener(rollPitchListener);
      }
    } else if (rollAndPitchType == JoystickType.ACCELERO) {
      if (rollAndPitchJoystick == null || !(rollAndPitchJoystick instanceof AcceleratorJoystick)) {
        rollAndPitchJoystick =
            JoystickFactory.createAcceleroJoystick(
                this.getContext(), false, rollPitchListener, true);
        // rollAndPitchJoystick.setXDeadBand(settings.getAileronDeadBand());
        // rollAndPitchJoystick.setYDeadBand(settings.getElevatorDeadBand());
      } else {
        rollAndPitchJoystick.setOnAnalogueChangedListener(rollPitchListener);
      }
    }

    if (rudderAndThrottleJoystick == null
        || !(rudderAndThrottleJoystick instanceof AnalogueJoystick)) {
      rudderAndThrottleJoystick =
          JoystickFactory.createAnalogueJoystick(
              this.getContext(), false, rudderThrottleListener, false);
      rudderAndThrottleJoystick.setXDeadBand(settings.getRudderDeadBand());
    } else {
      rudderAndThrottleJoystick.setOnAnalogueChangedListener(rudderThrottleListener);
    }

    rollAndPitchJoystick.setIsRollPitchJoystick(true);
    rudderAndThrottleJoystick.setIsRollPitchJoystick(false);

    joysticks[0] = rollAndPitchJoystick;
    joysticks[1] = rudderAndThrottleJoystick;

    setJoysticks();

    getRudderAndThrottleJoystick().setYValue(-1);
  }