コード例 #1
0
 /// <summary>
 /// Build an AxisPositionController object.
 /// 
 /// </summary>
 /// <param name="axis">Axis controlled by this object</param>
 /// <param name="deviceController">Actual hardware controller</param>
 /// <param name="minusSlewRate">Slew rate to use when moving in the MINUS orientation</param>
 /// <param name="plusSlewRate">Slew rate to use when moving in the PLUS orientation</param>
 public AxisController(Axis axis, DeviceController deviceController, double minusSlewRate, double plusSlewRate)
 {
     this.traceLogger = new TraceLogger("", "ArduinoST4 AxisPositionController " + axis.ToString());
     this.traceLogger.Enabled = true;
     this.axis = axis;
     this.deviceController = deviceController;
     this.minusSlewRate = minusSlewRate;
     this.plusSlewRate = plusSlewRate;
     this.axisMovementTracker = new AxisMovementTracker();
 }
コード例 #2
0
ファイル: Driver.cs プロジェクト: mikenorgate/arduino-st4
        public Telescope()
        {
            // Read device configuration from the ASCOM Profile store
            ReadProfile();

            traceLogger = new TraceLogger("", "ArduinoST4");
            traceLogger.Enabled = traceState;
            traceLogger.LogMessage("Telescope", "Starting initialisation");

            deviceController = new DeviceController();

            //Setup the axes
            axisControllers = new AxisController[2];
            axisControllers[(int)Axis.RA] = new AxisController(Axis.RA, this.deviceController, -Constants.RA_PER_SECOND * rightAscensionSideralRateMinus, Constants.RA_PER_SECOND * rightAscensionSideralRatePlus);
            axisControllers[(int)Axis.DEC] = new AxisController(Axis.DEC, this.deviceController, -Constants.DEGREES_PER_SECOND * declinationSideralRateMinus, Constants.DEGREES_PER_SECOND * declinationSideralRatePlus);
            traceLogger.LogMessage("Telescope", "Completed initialisation");
        }