test: cover the roam threshold and who gets memStatus

Move the roam check into worthRoaming() and the memStatus routing into
heapEmitTarget() in Utils so the native tests reach them.

worthRoaming() roams for a gain of at least ROAM_MIN_GAIN_DB, as the
comment and the 6 dB commit said. The old check needed one dB more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-13 15:37:12 +02:00
parent 3a2702af6c
commit 293e013aa2
5 changed files with 72 additions and 22 deletions

View file

@ -16,7 +16,7 @@
// How often memStatus is broadcast. It is also the one event that is always
// sent, so it must stay well under Home Assistant's 60s receive timeout.
#define HEAP_EMIT_MS 30000
// A roaming scan only moves to another AP this much stronger.
// A roaming scan only moves to another AP at least this much stronger.
#define ROAM_MIN_GAIN_DB 6
class ESPNetwork {
protected: