Servo Kernel

Pulse-width envelope, per-function trim and speed limiting — the low-level servo contract.

Pulse-width envelope

The servo kernel maps a normalised angle (−1…+1) to a pulse width through a global envelope defined by servoMinUs (default 988) and servoMaxUs (default 2012). This replaced the old compile-time constants so the 0°/180° swing can be matched to any servo without a rebuild. The values are clamped to [500…1490] and [1510…2500] with min < max enforced.

Per-function trim

servoTrimUs[] is a per-ServoFunc correction (±300 µs) applied after mixing. It covers the wing pair (indices 1/2), rudder (3) and the back wings (8/9). Use it to zero out a half-tooth horn offset on a single surface — not to fight an airframe imbalance, which belongs in the mixer or the gyro.

Speed limiting

Servo speed limits the rate of pulse change per tick, smoothing hard reversals and protecting gearboxes from snap loads. It is a low-pass on the commanded position, so a low value also softens the flap reversal — tune it against the click at the top and bottom of the stroke. Too slow and the wing lags the waveform; too fast and you re-introduce the snap.

For the full pulse/trim/speed parameter list and JSON keys, see the servo-kernel note in the firmware and the WebUI reference.