namespace Tinkerforge
{
    public static class EServo
    {
        public static (byte ServoNumber, int Min, int Max) GetPulseWidth(this BrickServo servo, byte servoNum)
        {
            servo.GetPulseWidth(servoNum, out int min, out int max);
            return (servoNum, min, max);
        }

        public static (byte ServoNumber, short Min, short Max) GetDegree(this BrickServo servo, byte servoNum)
        {
            servo.GetDegree(servoNum, out short min, out short max);
            return (servoNum, min, max);
        }

        public static (char Port, byte ProtocolVersion, byte[] FirmwareVersion, string Name) GetProtocol1BrickletName(
            this BrickServo servo, char port)
        {
            servo.GetProtocol1BrickletName(port, out byte protocolVersion, out byte[] firmwareVersion, out string name);
            return (port, protocolVersion, firmwareVersion, name);
        }
    }
}
