test: the noise probe reads the trigger's band and HF reject

Six legs over one retained buffer, each a full rising-edge search through `BufferSearch` at
level 0, run back to back without yielding so every leg sees the same samples: the bare
comparator on a spiked sine, a 0.8 band, a 50 Hz reject, both, and the reject's group delay
on `square` -- which carries no impulses, so a one-pole's crossing of zero after a step is
exactly `tau*ln2` and the delay is an exact prediction rather than a coincidence.

    trigger band:  bare=49/2 band=7/2 ratio=7.00
    trigger hf:    hf=7/2 band+hf=7/2 band=7
    trigger delay: clean=4 filtered=4 delay=0.002206 want=0.002206 ratio=1.000

`ratio >= 5`, both HF legs within 2 of the band, `ratio` between 0.7 and 1.4, `state=2` on
every leg, no Gtk-CRITICAL. `bare` and `band` are proportional to the retained buffer, so
neither is a fixed number; the ratios and the agreement between legs are the assertions.

The probe enables the signals it measures itself rather than relying on another probe's side
effects -- `enable_all_probe` ends by switching one off again, which is how `sine` was missing
from the first run of this one -- and arms in two phases because that enable is a structural
change that replaces the store, so the ring has to fill before there is anything to search.
Its "no stream" line now names the channels that *are* there: an index alone says a probe
found nothing, not what it saw.
This commit is contained in:
Martino Ferrari committed 2026-10-13 15:35:03 +02:00
1 parent 1583741e03
commit fec0a1032e
5 files changed
+184

No files matched your search

+3
View File
@@ -5395,6 +5395,9 @@ int run_ui(int argc, char** argv, const Config& cfg, ScopeModel& model, Acquisit
if (const char* env = g_getenv("UDPSCOPE_PROBE_DROP_MS")) {
g_timeout_add(static_cast<guint>(std::atoi(env)), drop_probe, &app);
}
if (const char* env = g_getenv("UDPSCOPE_PROBE_NOISE_MS")) {
g_timeout_add(static_cast<guint>(std::atoi(env)), noise_probe, &app);
}
if (const char* env = g_getenv("UDPSCOPE_PROBE_ROWMENU_MS")) {
rowmenu_probe_next(app, 0, static_cast<guint>(std::atoi(env)));
}