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

            motor.Id = id;
            return(motor);
        }
Example #2
0
 /// <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(LargeMotor motor)
 {
     return(new SynchronizedMotors(this, motor));
 }