mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
Fix Alex XVTR DDC In: block bits 8+11 when transverter not active
CalcAlex0: Alex.RxOnly[band]=3 (XVTR checkbox in Antenna tab) now sets XVTR DDC In only when XvtrActive=True (FXvtrEnable). Matches Thetis Alex.cs behaviour: "do not use XVTR ant port if not using transverter". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+9
-4
@@ -1134,7 +1134,8 @@ function CalcAlex0(RXFreqHz, TXFreqHz: Double;
|
||||
const Alex: TAlexSettings;
|
||||
XvtrRxAnt: Byte = 0;
|
||||
XvtrUseRxDDCIn: Boolean = False;
|
||||
XvtrDisablePA: Boolean = False): LongWord;
|
||||
XvtrDisablePA: Boolean = False;
|
||||
XvtrActive: Boolean = False): LongWord;
|
||||
var
|
||||
txf: Double;
|
||||
BandIdx: Integer;
|
||||
@@ -1237,8 +1238,11 @@ begin
|
||||
or $00000800; // bit 11: Bypass relay
|
||||
2: Result := Result or $00000400 // bit 10: Ext2
|
||||
or $00000800; // bit 11: Bypass relay
|
||||
3: Result := Result or $00000100 // bit 8: XVTR DDC In
|
||||
or $00000800; // bit 11: Bypass relay
|
||||
// XVTR DDC In только когда трансвертер активен — иначе порт молчит
|
||||
// (аналог Thetis Alex.cs: "do not use XVTR ant port if not using transverter")
|
||||
3: if XvtrActive then
|
||||
Result := Result or $00000100 // bit 8: XVTR DDC In
|
||||
or $00000800; // bit 11: Bypass relay
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -1405,7 +1409,8 @@ begin
|
||||
begin
|
||||
Alex0 := CalcAlex0(FCurrentRXFreq, FCurrentTXFreq,
|
||||
FIsTransmitting, IsOrion2, FAlexConfig,
|
||||
FXvtrRxAntOverride, FXvtrUseRxDDCIn, FXvtrDisablePA);
|
||||
FXvtrRxAntOverride, FXvtrUseRxDDCIn, FXvtrDisablePA,
|
||||
FXvtrEnable);
|
||||
Buf[1432] := (Alex0 shr 24) and $FF;
|
||||
Buf[1433] := (Alex0 shr 16) and $FF;
|
||||
Buf[1434] := (Alex0 shr 8) and $FF;
|
||||
|
||||
Reference in New Issue
Block a user