/// <summary> /// Initializes a new instance of the <see cref="TwoPhaseMicrosteppingSequencer"/> class. /// </summary> /// <param name="phase1bridge">The H-Bridge that controls motor phase 1.</param> /// <param name="phase2bridge">The H-Bridge that controls motor phase 2.</param> /// <param name="stepsPerStepCycle">The steps per step cycle.</param> public TwoPhaseMicrosteppingSequencer(HBridge phase1bridge, HBridge phase2bridge, int stepsPerStepCycle) { phase1 = phase1bridge; phase2 = phase2bridge; maxIndex = stepsPerStepCycle - 1; phaseIndex = 0; ConfigureStepTables(stepsPerStepCycle); }
/// <summary> /// Initializes a new instance of the <see cref="DcMotor" /> class. /// </summary> /// <param name="motorWinding">The H-Bridge that controls the motor winding.</param> /// <param name="accelerationResolutionInMilliseconds"> /// Optional. The resolution of the /// acceleration curve computation, in system clock ticks. Must be greater than /// <see cref="TimeSpan.TicksPerMillisecond" /> /// </param> public DcMotor(HBridge motorWinding, int accelerationResolutionInMilliseconds = DefaultResolution) { Acceleration = 0.2; this.motorWinding = motorWinding; this.accelerationResolutionInMilliseconds = accelerationResolutionInMilliseconds; }