rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
servo_sync_cfg_t Struct Reference

Data Fields

uint16_t centre_us
uint16_t deflection_us
int16_t window_us
uint8_t points
uint8_t rounds
uint16_t settle_ms
 How long to wait after a move before a reading counts.
float slew_us_per_ms
uint16_t measure_ms
float min_depth_a
 How far the best reading of a scan must sit below the worst before the minimum counts.
float hard_limit_a

Field Documentation

◆ deflection_us

uint16_t servo_sync_cfg_t::deflection_us

how far out the ends are measured

◆ min_depth_a

float servo_sync_cfg_t::min_depth_a

How far the best reading of a scan must sit below the worst before the minimum counts.

Two servos that are already synchronised produce a flat scan, and the argmin of a flat scan is wherever the noise dips. Without this test the routine returns a correction derived from noise.

◆ points

uint8_t servo_sync_cfg_t::points

samples per round, <= SERVO_SYNC_MAX_POINTS

◆ rounds

uint8_t servo_sync_cfg_t::rounds

how many times the window narrows

◆ settle_ms

uint16_t servo_sync_cfg_t::settle_ms

How long to wait after a move before a reading counts.

Two parts, because the moves differ in size. Stepping to the next scan point is a few microseconds of pulse width; changing stage swings a servo across its whole deflection, over 1s on a slow servo. One fixed wait is either sized for the large move and wastes two thirds of the search, or sized for the small move and reads two servos still travelling at the start of every stage.

The wait is settle_ms plus the time the commanded move takes at slew_us_per_ms. That rate is an estimate of the servos under test and belongs on the pessimistic side: too slow costs time, too fast costs the answer.

◆ window_us

int16_t servo_sync_cfg_t::window_us

half-width of the first scan, each stage


The documentation for this struct was generated from the following file: