Exemplo n.º 1
0
        private async Task PrepareForSlewingAsync(MountAxis axis, double speed, double absoluteSpeed)
        {
            await this._mountControl.QueryStatus(axis).ConfigureAwait(false);

            await this.StopAxisIfRequiredAsync(axis, speed, absoluteSpeed).ConfigureAwait(false);

            MotionModeHiBitFlags directionOnClock = MotionModeHiBitFlags.None;

            if (speed < 0.0)
            {
                directionOnClock = MotionModeHiBitFlags.DirectionOnClock;
            }
            else
            {
                //
            }

            if (absoluteSpeed > MountControlConstants.LOW_SPEED_MARGIN)
            {
                // Set HIGH speed slewing mode.
                await this._mountControl.SetMotionMode(axis, MotionModeLoBitFlags.TrackingModeFast, directionOnClock).ConfigureAwait(false);
            }
            else
            {
                // Set LOW speed slewing mode.
                await this._mountControl.SetMotionMode(axis, MotionModeLoBitFlags.TrackingModeSlow, directionOnClock).ConfigureAwait(false);
            }
        }
Exemplo n.º 2
0
        public Task SetMotionMode(MountAxis axis, MotionModeLoBitFlags func, MotionModeHiBitFlags direction)
        {
            string szCmd = "" + (int)func + (int)direction;

            byte[] command = this._commandBuilder.BuildSetMotionModeCommand(axis, szCmd);

            return(this.SendCommand(this._mountInfo.WifiMount, command));
        }