Esempio n. 1
0
        /// <summary>
        /// procedure to convert from information from the arm to wanted angles
        /// </summary>
        /// <param name="servoPositions"></param>
        /// <returns></returns>
        private ServoPositions ConvertToAnglesFromServoOrPwm(ServoPositions servoPositions)
        {
            double baseAngle     = m_Configuration.PwmToAngleForBase(servoPositions.Base);
            double shoulderAngle = m_Configuration.PwmToAngleForShoulder(servoPositions.Shoulder);
            double elbowAngle    = m_Configuration.PwmToAngleForElbow(servoPositions.Elbow);

            return(new ServoPositions(baseAngle, shoulderAngle, elbowAngle));
        }