You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's unclear from the documentation whether the intended use is an unsigned result from count(), with direction() indicating which way the system has moved from its zero point, or whether count() may return a signed value and direction() indicates the sign of the last change in location.
From an ergonomic standpoint, I strongly prefer the use of a signed count() -- perhaps enforced on the Count type? The hidden lines in the example seem to suggest an unsigned value being the intended use, however.
This would probably be clarified by a reference implementation.
Count reset
Should the Qei trait have a reset_count(&mut self) method?
Users of a quadrature encoder might want the ability to make the current position "zero". Some hardware implementations will support this by default, or it can be done in software by subtracting an offset.
The text was updated successfully, but these errors were encountered:
Signed count
It's unclear from the documentation whether the intended use is an unsigned result from
count()
, withdirection()
indicating which way the system has moved from its zero point, or whethercount()
may return a signed value anddirection()
indicates the sign of the last change in location.From an ergonomic standpoint, I strongly prefer the use of a signed
count()
-- perhaps enforced on theCount
type? The hidden lines in the example seem to suggest an unsigned value being the intended use, however.This would probably be clarified by a reference implementation.
Count reset
Should the
Qei
trait have areset_count(&mut self)
method?Users of a quadrature encoder might want the ability to make the current position "zero". Some hardware implementations will support this by default, or it can be done in software by subtracting an offset.
The text was updated successfully, but these errors were encountered: