namespace Tinkerforge
{
    public static class EJoystick
    {
        public static (short X, short Y) GetPosition(this BrickletJoystick joystick)
        {
            joystick.GetPosition(out short x, out short y);
            return (x, y);
        }

        public static (int X, int Y) GetAnalogValue(this BrickletJoystick joystick)
        {
            joystick.GetAnalogValue(out int x, out int y);
            return (x, y);
        }

        public static (char Option, short MinX, short MaxX, short MinY, short MaxY) GetPositionCallbackThreshold(
            this BrickletJoystick joystick)
        {
            joystick.GetPositionCallbackThreshold(out char option, out short minX, out short maxX, out short minY,
                out short maxY);
            return (option, minX, maxX, minY, maxY);
        }

        public static (char Option, int MinX, int MaxX, int MinY, int MaxY) GetAnalogValueCallbackThreshold(
            this BrickletJoystick joystick)
        {
            joystick.GetAnalogValueCallbackThreshold(out char option, out int minX, out int maxX, out int minY,
                out int maxY);
            return (option, minX, maxX, minY, maxY);
        }
    }
}
