private void FindProperties()
          {
              nameProperty      = IRServoPartType.GetProperty("Name");
              highlightProperty = IRServoPartType.GetProperty("Highlight");
              UIDProperty       = IRServoPartType.GetProperty("UID");
              HostPartProperty  = IRServoPartType.GetProperty("HostPart");

              var mechanismProperty = IRServoType.GetProperty("Mechanism");

              actualServoMechanism = mechanismProperty.GetValue(actualServo, null);

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

              actualServoMotor = motorProperty.GetValue(actualServo, null);

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

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

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

              speedProperty          = IRServoMotorType.GetProperty("SpeedLimit");
              configSpeedProperty    = IRServoMotorType.GetProperty("DefaultSpeed");
              currentSpeedProperty   = IRServoMotorType.GetProperty("CurrentSpeed");
              accelerationProperty   = IRServoMotorType.GetProperty("AccelerationLimit");
              isAxisInvertedProperty = IRServoMotorType.GetProperty("IsAxisInverted");
          }
Exemplo n.º 2
0
 internal IRServo(Object s)
 {
     actualServo = s;
     NameField   = IRServoType.GetField("Name");
 }