Skip to content

File syn_rc_curve.h

FileList > control > syn_rc_curve.h

Go to the source code of this file

Zero-Heap RC Stick Exponential (Expo) & Deadband Curve Mapper. More...

  • #include "syntropic/common/syn_defs.h"
  • #include "syntropic/util/syn_qmath.h"
  • #include <stdbool.h>
  • #include <stddef.h>
  • #include <stdint.h>

Classes

Type Name
struct SYN_RCCurve_Config

Public Functions

Type Name
uint16_t syn_rc_curve_apply (uint16_t input_us, const SYN_RCCurve_Config * config)
Apply deadband, exponential response, and dual-rate scaling to raw RC channel (1000..2000 us).

Detailed Description

Provides stick input response shaping for drones/RC models: * Deadband filtering: Ignores micro-stick jitter around neutral center (1500 us +/- deadband). * Exponential curve: y = (1 - expo) * x + expo * x^3 (softens center stick precision). * Dual Rate: Scales output range (0..100%).

All operations use Q16.16 fixed-point arithmetic. Zero float / zero heap.

Public Functions Documentation

function syn_rc_curve_apply

Apply deadband, exponential response, and dual-rate scaling to raw RC channel (1000..2000 us).

uint16_t syn_rc_curve_apply (
    uint16_t input_us,
    const SYN_RCCurve_Config * config
) 

Parameters:

  • input_us Raw input pulse width in microseconds (1000..2000 us).
  • config Pointer to RC curve configuration.

Returns:

Scaled & shaped output in microseconds (clamped 1000..2000 us).



The documentation for this class was generated from the following file src/syntropic/control/syn_rc_curve.h