ScaledQuadratureEncoder.Acceleration(Int32) Method

Definition

Calculate the amount of acceleration to be applied to the increment of the encoder.

protected virtual int Acceleration (int milliSecondsSinceLastPulse);
abstract member Acceleration : int -> int
override this.Acceleration : int -> int
Protected Overridable Function Acceleration (milliSecondsSinceLastPulse As Integer) As Integer

Parameters

milliSecondsSinceLastPulse
Int32

The amount of time elapsed since the last data pulse from the encoder in milliseconds.

Returns

A value that can be used to apply acceleration to the rotary encoder.

Remarks

This uses a straight line function output = input * AccelerationSlope + Acceleration offset but can be overridden to perform different algorithms.

Applies to