/// <summary> /// <para>Attaches a motor to the NXT brick.</para> /// </summary> /// <param name="motor">The motor</param> /// <param name="port">The port to attach the motor to</param> private void AttachMotor(NxtMotor motor, NxtMotorPort port) { if (motor != null) { motorArr[port] = motor; motor.Brick = this; motor.Port = port; } }
/// <summary> /// <para>Constructor.</para> /// </summary> /// <param name="motorX">The 1. motor of the synchronized pair</param> /// <param name="motorY">The 2. motor of the synchronized pair</param> public NxtMotorSync(NxtMotor motorX, NxtMotor motorY) { if (motorX == null || motorY == null) { throw new ArgumentException("One of the motors was null."); } this.motorX = motorX; this.motorY = motorY; }