Esempio n. 1
0
            private void FindProperties()
            {
                nameProperty      = IR3ServoPartType.GetProperty("Name");
                highlightProperty = IR3ServoPartType.GetProperty("Highlight");
                UIDProperty       = IR3ServoPartType.GetProperty("UID");
                HostPartProperty  = IR3ServoPartType.GetProperty("HostPart");

                var motorProperty = IR3ServoType.GetProperty("Motor");

                actualServoMotor = motorProperty.GetValue(actualServo, null);

                positionProperty    = IR3ServoMechanismType.GetProperty("Position");
                minPositionProperty = IR3ServoMechanismType.GetProperty("MinPositionLimit");
                maxPositionProperty = IR3ServoMechanismType.GetProperty("MaxPositionLimit");

                minConfigPositionProperty = IR3ServoMechanismType.GetProperty("MinPosition");
                maxConfigPositionProperty = IR3ServoMechanismType.GetProperty("MaxPosition");

                isMovingProperty     = IR3ServoMechanismType.GetProperty("IsMoving");
                isFreeMovingProperty = IR3ServoMechanismType.GetProperty("IsFreeMoving");
                isLockedProperty     = IR3ServoMechanismType.GetProperty("IsLocked");

                speedProperty          = IR3ServoMotorType.GetProperty("SpeedLimit");
                configSpeedProperty    = IR3ServoMotorType.GetProperty("DefaultSpeed");
                currentSpeedProperty   = IR3ServoMotorType.GetProperty("Speed");
                accelerationProperty   = IR3ServoMotorType.GetProperty("AccelerationLimit");
                isAxisInvertedProperty = IR3ServoMotorType.GetProperty("IsAxisInverted");
            }
Esempio n. 2
0
 private void FindMethods()
 {
     moveRightMethod      = IR3ServoMotorType.GetMethod("MoveRight", BindingFlags.Public | BindingFlags.Instance);
     moveLeftMethod       = IR3ServoMotorType.GetMethod("MoveLeft", BindingFlags.Public | BindingFlags.Instance);
     moveCenterMethod     = IR3ServoMotorType.GetMethod("MoveCenter", BindingFlags.Public | BindingFlags.Instance);
     moveNextPresetMethod = IR3ServoMotorType.GetMethod("MoveNextPreset", BindingFlags.Public | BindingFlags.Instance);
     movePrevPresetMethod = IR3ServoMotorType.GetMethod("MovePrevPreset", BindingFlags.Public | BindingFlags.Instance);
     stopMethod           = IR3ServoMotorType.GetMethod("Stop", BindingFlags.Public | BindingFlags.Instance);
     moveToMethod         = IR3ServoMotorType.GetMethod("MoveTo", new[] { typeof(float), typeof(float) });
 }