コード例 #1
0
        /// <summary>
        /// stops the diseqc motor
        /// </summary>
        public void StopMotor()
        {
            if (_cardHandler.IsLocal == false)
            {
                return;
            }

            IDiSEqCMotor motor = _cardHandler.Card.DiSEqCMotor;

            if (motor == null)
            {
                return;
            }
            motor.StopMotor();
        }
コード例 #2
0
        /// <summary>
        /// Drives the diseqc motor to the specified position
        /// </summary>
        /// <param name="position">The position.</param>
        public void GotoStoredPosition(byte position)
        {
            if (_cardHandler.IsLocal == false)
            {
                return;
            }

            IDiSEqCMotor motor = _cardHandler.Card.DiSEqCMotor;

            if (motor == null)
            {
                return;
            }
            motor.GotoPosition(position);
        }
コード例 #3
0
        /// <summary>
        /// Drives the diseqc motor to the reference positition
        /// </summary>
        public void GotoReferencePosition()
        {
            if (_cardHandler.IsLocal == false)
            {
                return;
            }

            IDiSEqCMotor motor = _cardHandler.Card.DiSEqCMotor;

            if (motor == null)
            {
                return;
            }
            motor.GotoReferencePosition();
        }
コード例 #4
0
        /// <summary>
        /// Drives the diseqc motor in the direction specified by the number of steps
        /// </summary>
        /// <param name="direction">The direction.</param>
        /// <param name="numberOfSteps">The number of steps.</param>
        public void DriveMotor(DiSEqCDirection direction, byte numberOfSteps)
        {
            if (_cardHandler.IsLocal == false)
            {
                return;
            }

            IDiSEqCMotor motor = _cardHandler.Card.DiSEqCMotor;

            if (motor == null)
            {
                return;
            }
            motor.DriveMotor(direction, numberOfSteps);
        }
コード例 #5
0
        /// <summary>
        /// Enables or disables the use of the west/east limits
        /// </summary>
        /// <param name="onOff">if set to <c>true</c> [on off].</param>
        public void EnableEastWestLimits(bool onOff)
        {
            if (_cardHandler.IsLocal == false)
            {
                return;
            }

            IDiSEqCMotor motor = _cardHandler.Card.DiSEqCMotor;

            if (motor == null)
            {
                return;
            }
            motor.ForceLimits = onOff;
        }
コード例 #6
0
        /// <summary>
        /// returns the current diseqc motor position
        /// </summary>
        /// <param name="satellitePosition">The satellite position.</param>
        /// <param name="stepsAzimuth">The steps azimuth.</param>
        /// <param name="stepsElevation">The steps elevation.</param>
        public void GetPosition(out int satellitePosition, out int stepsAzimuth, out int stepsElevation)
        {
            satellitePosition = -1;
            stepsAzimuth      = 0;
            stepsElevation    = 0;
            if (_cardHandler.IsLocal == false)
            {
                return;
            }

            IDiSEqCMotor motor = _cardHandler.Card.DiSEqCMotor;

            if (motor == null)
            {
                return;
            }
            motor.GetPosition(out satellitePosition, out stepsAzimuth, out stepsElevation);
        }