Beispiel #1
0
            private void FindProperties()
            {
                nameProperty      = IRServoType.GetProperty("Name");
                highlightProperty = IRServoType.GetProperty("Highlight");
                UIDProperty       = IRServoType.GetProperty("UID");
                HostPartProperty  = IRServoType.GetProperty("HostPart");

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

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

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

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

                actualServoMotor = motorProperty.GetValue(actualServo, null);

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