fix: refresh S-meter in headless daemon

FLastSMeter is sourced from WDSP (GetSMeterDBm), not the network HP-status,
so only the GUI timer (MainForm) ever updated it. In headless mode nothing
did, leaving PushState to send web clients a frozen -130 dBm. Refresh it in
the daemon Run loop before each PushState, mirroring the GUI timer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 20:17:07 +03:00
co-authored by Claude Opus 4.8
parent 341bb249fd
commit 0d82d1d8e6
+5
View File
@@ -410,6 +410,11 @@ begin
nowMs := GetTickCount64;
if nowMs - lastPush >= PUSH_INTERVAL_MS then
begin
// S-метр приходит из WDSP (не из сетевого HP-статуса), поэтому его никто
// не обновляет в headless — освежаем здесь, как GUI-таймер (MainForm). Без
// этого PushState слал бы клиентам залипший -130 dBm.
if FCtrl.FRunning and FCtrl.FWDSPReady then
FCtrl.FLastSMeter := FCtrl.FDSPEngine.GetSMeterDBm;
FWebAd.PushState; // исходящее зеркало состояния/спектра
lastPush := nowMs;
end;