mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
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:
@@ -410,6 +410,11 @@ begin
|
|||||||
nowMs := GetTickCount64;
|
nowMs := GetTickCount64;
|
||||||
if nowMs - lastPush >= PUSH_INTERVAL_MS then
|
if nowMs - lastPush >= PUSH_INTERVAL_MS then
|
||||||
begin
|
begin
|
||||||
|
// S-метр приходит из WDSP (не из сетевого HP-статуса), поэтому его никто
|
||||||
|
// не обновляет в headless — освежаем здесь, как GUI-таймер (MainForm). Без
|
||||||
|
// этого PushState слал бы клиентам залипший -130 dBm.
|
||||||
|
if FCtrl.FRunning and FCtrl.FWDSPReady then
|
||||||
|
FCtrl.FLastSMeter := FCtrl.FDSPEngine.GetSMeterDBm;
|
||||||
FWebAd.PushState; // исходящее зеркало состояния/спектра
|
FWebAd.PushState; // исходящее зеркало состояния/спектра
|
||||||
lastPush := nowMs;
|
lastPush := nowMs;
|
||||||
end;
|
end;
|
||||||
|
|||||||
Reference in New Issue
Block a user