Beispiel #1
0
        public static MediumMotor LoadMediumMotor(string id)
        {
            DeviceOptions device = LoadDevice(id, DeviceType.MediumMotor);
            MediumMotor   motor  = (device.Mode != null && Enum.IsDefined(typeof(Polarity), device.Mode)) ? new MediumMotor((Polarity)Enum.Parse(typeof(Polarity), device.Mode, true)) : new MediumMotor();

            motor.Id = id;
            return(motor);
        }
 /// <summary>
 /// Method allows two motors to synchronize and expose synchronized methods
 /// </summary>
 /// <param name="motor">The motor where this motor is synchronized with</param>
 /// <returns>a set of synchronized motors</returns>
 public SynchronizedMotors SynchronizeWith(MediumMotor motor)
 {
     return(new SynchronizedMotors(this, motor));
 }