Exemple #1
0
        public FocusAssembly(
            Logger Logger,
            byte MotorSelectPin,
            byte MotorResetPin,
            byte EncoderSelectPin,
            double StepAngle,
            double MaxCurrent,
            int LowerEncoderBound,
            int UpperEncoderBound,
            int BoundSafetyThreshold = 500,
            int TargetThreshold      = 5,
            int EncoderUpdateRate    = 50)
        {
            this.Logger               = Logger;
            Encoder                   = new Amt22(EncoderSelectPin, Logger);
            Driver                    = new L6470(MotorSelectPin, MotorResetPin, StepAngle, MaxCurrent);
            this.LowerEncoderBound    = LowerEncoderBound;
            this.UpperEncoderBound    = UpperEncoderBound;
            this.BoundSafetyThreshold = BoundSafetyThreshold;
            this.TargetThreshold      = TargetThreshold;
            this.EncoderUpdateRate    = EncoderUpdateRate;

            StopMove = false;
            MoveLock = new object();
        }
Exemple #2
0
 public void SetHardware(FocusAssembly FocusAssembly)
 {
     Encoder = FocusAssembly.Encoder;
     Driver  = FocusAssembly.Driver;
 }