コード例 #1
0
ファイル: MockMotor.cs プロジェクト: MorganR/wizards-chess
        public static MockMotor Create()
        {
            var motor = new MockMotor();
            var info  = new MotorInformation(Axis.X, motor);

            motor.Information = info;
            return(motor);
        }
コード例 #2
0
        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;
        }