mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
Phase 5 (D4 fix): daemon shares GUI config dir (EWSDR app name)
GetAppConfigDir derives the dir from ApplicationName, which defaulted to the binary name 'ewsdrd' -> a separate empty ~/.config/ewsdrd/. With no per-device settings the daemon never configured WDSP's FFT/spectrum/waterfall display (web showed a white waterfall and no spectrum), never resolved a saved board type (Board=0), and -- critically -- found no FFTW wisdom, so WDSP recomputed it from scratch on Open (~48s vs <1s in the GUI). Set OnGetApplicationName := 'EWSDR' (matching the GUI's Application.Title) before constructing the controller, so the daemon reads the same ~/.config/EWSDR/ (settings, saved devices, wdspWisdom00). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
de234b56e5
commit
db361a274b
+10
@@ -86,6 +86,15 @@ begin
|
|||||||
Flush(Output);
|
Flush(Output);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function DaemonAppName: string;
|
||||||
|
begin
|
||||||
|
// КРИТИЧНО: тот же каталог конфигурации, что у GUI (~/.config/EWSDR/).
|
||||||
|
// GetAppConfigDir берёт имя из ApplicationName, иначе бы вышло «ewsdrd» —
|
||||||
|
// отдельный пустой конфиг (нет device-настроек/FFT-параметров/FFTW-wisdom →
|
||||||
|
// белый водопад + WDSP открывается ~минуту). GUI задаёт Application.Title:=EWSDR.
|
||||||
|
Result := 'EWSDR';
|
||||||
|
end;
|
||||||
|
|
||||||
{$IFDEF UNIX}
|
{$IFDEF UNIX}
|
||||||
procedure HandleSignal(sig: cint); cdecl;
|
procedure HandleSignal(sig: cint); cdecl;
|
||||||
begin
|
begin
|
||||||
@@ -387,6 +396,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
OnGetApplicationName := @DaemonAppName; // ДО создания контроллера/настроек!
|
||||||
Log('EWSDR daemon starting (headless).');
|
Log('EWSDR daemon starting (headless).');
|
||||||
GHost := THeadlessHost.Create;
|
GHost := THeadlessHost.Create;
|
||||||
{$IFDEF UNIX}
|
{$IFDEF UNIX}
|
||||||
|
|||||||
Reference in New Issue
Block a user