mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 18:43:51 +00:00
Add FM mode improvements: NFM/FM filters, CTCSS, squelch; ADC and web settings
FM modulation: - Replace 10 generic FM filter buttons with NFM (2.5kHz dev/11kHz BW) and FM (5.0kHz dev/16kHz BW); deviation applied to both RX and TX via WDSP - Add FM squelch panel (SQL toggle + slider 0..100, per-band save/restore) with WDSP SetRXAFMSQRun/SetRXAFMSQThreshold (threshold = level/200.0) - Add CTCSS panel with on/off toggle and custom flat-button tone picker popup (38 standard tones 67.0..250.3 Hz, default 67.0); tone selection and enable state saved per band via SetTXACTCSS* - FM panels (SQL, CTCSS) shown only in FM mode, layout via RelayoutBelowBands - PanelFilter height shrinks in FM mode so panels sit tight below filters - FlatButton: handle CMTextChanged to invalidate on Caption change ADC settings (Dither/Random): - Add DitherEnabled/RandomEnabled to TGlobalSettings (default true) - Pass as bitmask to ConfigureDDCs DDC Specific packet bytes 5/6 - Exposed in Settings → Advanced tab with live apply via ApplyADCSettings Web server settings: - Add TWebSettings (enabled, port, bind_addr, user, pass) stored globally - WebServer: configurable port/bind IP via ParseIPv4; Reconfigure method - Exposed in Settings → Advanced tab with live apply via ApplyWebSettings Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -360,6 +360,8 @@ type
|
||||
procedure SetNB(Enable: Boolean);
|
||||
procedure SetSNB(Enable: Boolean);
|
||||
procedure SetANF(Enable: Boolean);
|
||||
procedure SetRXFMDeviation(Deviation: Double);
|
||||
procedure SetFMSquelch(Enable: Boolean; Level: Integer);
|
||||
procedure SetVolume(Vol: Double);
|
||||
procedure SetMute(Mute: Boolean);
|
||||
|
||||
@@ -1513,6 +1515,26 @@ begin
|
||||
ApplyANFState;
|
||||
end;
|
||||
|
||||
procedure TWDSPEngine.SetRXFMDeviation(Deviation: Double);
|
||||
begin
|
||||
if not FInitialized then Exit;
|
||||
SetRXAFMDeviation(RXA_CHAN, Deviation);
|
||||
end;
|
||||
|
||||
procedure TWDSPEngine.SetFMSquelch(Enable: Boolean; Level: Integer);
|
||||
var Threshold: Double;
|
||||
begin
|
||||
if not FInitialized then Exit;
|
||||
if Enable then
|
||||
begin
|
||||
Threshold := Level / 200.0; // 0..100 → 0.0..0.5
|
||||
SetRXAFMSQThreshold(RXA_CHAN, Threshold);
|
||||
SetRXAFMSQRun(RXA_CHAN, 1);
|
||||
end
|
||||
else
|
||||
SetRXAFMSQRun(RXA_CHAN, 0);
|
||||
end;
|
||||
|
||||
procedure TWDSPEngine.SetVolume(Vol: Double);
|
||||
begin
|
||||
FVolume := Max(0.0, Min(1.0, Vol));
|
||||
|
||||
Reference in New Issue
Block a user