public static MockMotor Create() { var motor = new MockMotor(); var info = new MotorInformation(Axis.X, motor); motor.Information = info; return(motor); }
public MockPhotoInterrupter(int gridPosition, int lowerMotorStepPosition, int upperMotorStepPosition, IMotorLocator mtrLocator, MockMotor mtr) : base() { GridPosition = gridPosition; StepPosition = (upperMotorStepPosition + lowerMotorStepPosition) / 2; UpperStepPosition = upperMotorStepPosition; LowerStepPosition = lowerMotorStepPosition; value = GpioValue.High; locator = mtrLocator; motor = mtr; locator.PositionChanged += positionChanged; }