mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 18:43:51 +00:00
scroll freq
This commit is contained in:
@@ -123,6 +123,7 @@ type
|
||||
TWebCmdANF = procedure(On_: Boolean) of object;
|
||||
TWebCmdFreqB = procedure(Hz: Double) of object;
|
||||
TWebCmdActiveVfo = procedure(Idx: Integer) of object;
|
||||
TWebCmdCenter = procedure(Hz: Double) of object;
|
||||
|
||||
// ── Главный класс сервера ─────────────────────────────────────────────────
|
||||
TWebServer = class
|
||||
@@ -202,6 +203,7 @@ type
|
||||
FOnANF: TWebCmdANF;
|
||||
FOnFreqB: TWebCmdFreqB;
|
||||
FOnActiveVfo: TWebCmdActiveVfo;
|
||||
FOnCenter: TWebCmdCenter;
|
||||
|
||||
FWebClientActive: Boolean;
|
||||
|
||||
@@ -267,6 +269,7 @@ type
|
||||
property OnANF: TWebCmdANF read FOnANF write FOnANF;
|
||||
property OnFreqB: TWebCmdFreqB read FOnFreqB write FOnFreqB;
|
||||
property OnActiveVfo: TWebCmdActiveVfo read FOnActiveVfo write FOnActiveVfo;
|
||||
property OnCenter: TWebCmdCenter read FOnCenter write FOnCenter;
|
||||
end;
|
||||
|
||||
implementation
|
||||
@@ -972,6 +975,12 @@ begin
|
||||
if ModeValue > 1 then ModeValue := 1;
|
||||
FStateLock.Enter; FActiveVfo := ModeValue; FStateLock.Leave;
|
||||
if Assigned(FOnActiveVfo) then FOnActiveVfo(ModeValue);
|
||||
end
|
||||
else if Cmd = 'set_center' then
|
||||
begin
|
||||
HzF := JsonGetFloat(Json, 'hz', FCenterHz);
|
||||
FStateLock.Enter; FCenterHz := HzF; FStateLock.Leave;
|
||||
if Assigned(FOnCenter) then FOnCenter(HzF);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user