Class Quadrature
Counts a quadrature encoder's steps from its A and B channels.
public sealed class Quadrature : IDisposable
- Inheritance
-
Quadrature
- Implements
- Inherited Members
Constructors
Quadrature(bool, bool)
Creates a decoder seeded with the channel levels it reads now.
public Quadrature(bool a = false, bool b = false)
Parameters
Remarks
Seeding with the real levels keeps the first reading from counting a step that did not happen.
Properties
Count
Gets the signed count of steps so far.
public long Count { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Reset()
Sets the count back to 0, keeping the channel state last read.
public void Reset()
Update(bool, bool)
Feeds the channel levels read now.
public int Update(bool a, bool b)
Parameters
Returns
- int
1 or -1 for a step in either direction, or 0 for no change or a jump past a step.