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

The beep detector: hysteresis on the current above its idle floor, pulse and gap lengths judged in readings, groups split by silence. More...

#include <esc_stick.h>

Data Fields

esc_stick_timing_t t
uint8_t long_equals_short
bool counting
bool seeded
int32_t floor_x16
bool have_prev
uint32_t prev_ms
uint32_t iv_max_ms
bool high
uint32_t rise_ms
uint32_t last_high_ms
uint32_t before_rise_ms
uint32_t n_high
bool stuck_told
bool wait_quiet
bool quiet_known
uint32_t quiet_from
bool busy
uint32_t busy_from
bool fell
uint32_t fall_ms
uint32_t n_low
bool group_open
bool group_bad
uint8_t shorts
uint8_t longs
uint8_t count
bool valid

Detailed Description

The beep detector: hysteresis on the current above its idle floor, pulse and gap lengths judged in readings, groups split by silence.

Lengths come from readings, so they are known to one reading interval. A pulse or gap is judged short when it holds fewer readings than the shortest beep or gap must hold at the longest interval seen; a pulse is judged long from the time between its first and last reading, which is never longer than the beep. A group with any pulse or gap judged wrong, or with a late reading inside it, is heard but not valid.

Counting starts on a quiet line: after esc_det_count() no group opens until GROUP GAP of quiet has passed, so the first group heard is a whole one and not the tail of a group already under way.

Field Documentation

◆ busy

bool esc_det_t::busy

not quiet while waiting

◆ busy_from

uint32_t esc_det_t::busy_from

when the line was last busy, ms

◆ counting

bool esc_det_t::counting

else only the floor is tracked

◆ fall_ms

uint32_t esc_det_t::fall_ms

first low reading after a pulse

◆ fell

bool esc_det_t::fell

a pulse has ended (fall_ms is set)

◆ floor_x16

int32_t esc_det_t::floor_x16

the idle current, mA x 16

◆ have_prev

bool esc_det_t::have_prev

whether prev_ms holds a reading time

◆ iv_max_ms

uint32_t esc_det_t::iv_max_ms

longest interval not late

◆ long_equals_short

uint8_t esc_det_t::long_equals_short

0: every beep is short

◆ n_low

uint32_t esc_det_t::n_low

consecutive low readings since the pulse ended

◆ prev_ms

uint32_t esc_det_t::prev_ms

bench time of the previous reading, ms

◆ quiet_from

uint32_t esc_det_t::quiet_from

the quiet began here

◆ quiet_known

bool esc_det_t::quiet_known

whether quiet_from is set

◆ seeded

bool esc_det_t::seeded

whether floor_x16 has its first reading

◆ wait_quiet

bool esc_det_t::wait_quiet

no group opens until a quiet gap


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