fix TUN tone frequency sign for LSB/CWL modes

gen1 (TXA PostGen) sits after all modulators and the bandpass filter,
so a positive frequency always produces a tone above the carrier.
For LSB and CWL the tone must appear below the carrier — negate the
frequency for those modes. Also re-apply the tone when mode is switched
while TUN is active.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-10 17:02:43 +03:00
co-authored by Claude Sonnet 4.6
parent 7a0b778114
commit 604fd836ba
2 changed files with 15 additions and 1 deletions
+5
View File
@@ -4352,7 +4352,12 @@ begin
FMode := N;
for i := 0 to MODE_COUNT - 1 do StyleButton(BtnMode[i], i = FMode);
if FWDSPReady then
begin
FDSPEngine.SetMode(N);
// Если TUN активен — пересчитываем знак частоты под новый режим
if FTuning then
FDSPEngine.SetTXTone(True, FTXSettings.TUNFreq, 1.0);
end;
UpdateFilterButtons; // обновляем подписи и дефолт фильтра под новый режим
ApplyModeFilter;
SyncSpecViewFreq; // FSpecView.Mode/FilterBW — иначе полоса рисуется под старый режим