CTRE Phoenix Pro C++ 23.0.12
|
Performs latency compensation on signal using the signalSlope and signal's latency to determine the magnitude of compensation.
Performs latency compensation on signal using the signalSlope and signal's latency to determine the magnitude of compensation. The caller must refresh these StatusSignalValues beforehand, this function only does the math required for latency compensation.
compensatedTurns = GetLatencyCompensatedValue(fx.GetPosition(), fx.GetVelocity());
U | Type of signal's underlying type. This is the type that the function will return. |
U_PER_SEC | Type of signalSlope's underlying type. This must be the derivative of U. |
signal | Signal to be latency compensated. Caller must make sure this signal is up to date either by calling Refresh() or WaitForUpdate() . |
signalSlope | Derivative of signal that informs compensation magnitude. Caller must make sure this signal is up to date either by calling Refresh() or WaitForUpdate() . |