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:
+8
-3
@@ -1134,7 +1134,8 @@ function CalcAlex0(RXFreqHz, TXFreqHz: Double;
|
|||||||
const Alex: TAlexSettings;
|
const Alex: TAlexSettings;
|
||||||
XvtrRxAnt: Byte = 0;
|
XvtrRxAnt: Byte = 0;
|
||||||
XvtrUseRxDDCIn: Boolean = False;
|
XvtrUseRxDDCIn: Boolean = False;
|
||||||
XvtrDisablePA: Boolean = False): LongWord;
|
XvtrDisablePA: Boolean = False;
|
||||||
|
XvtrActive: Boolean = False): LongWord;
|
||||||
var
|
var
|
||||||
txf: Double;
|
txf: Double;
|
||||||
BandIdx: Integer;
|
BandIdx: Integer;
|
||||||
@@ -1237,7 +1238,10 @@ begin
|
|||||||
or $00000800; // bit 11: Bypass relay
|
or $00000800; // bit 11: Bypass relay
|
||||||
2: Result := Result or $00000400 // bit 10: Ext2
|
2: Result := Result or $00000400 // bit 10: Ext2
|
||||||
or $00000800; // bit 11: Bypass relay
|
or $00000800; // bit 11: Bypass relay
|
||||||
3: Result := Result or $00000100 // bit 8: XVTR DDC In
|
// 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
|
or $00000800; // bit 11: Bypass relay
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -1405,7 +1409,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
Alex0 := CalcAlex0(FCurrentRXFreq, FCurrentTXFreq,
|
Alex0 := CalcAlex0(FCurrentRXFreq, FCurrentTXFreq,
|
||||||
FIsTransmitting, IsOrion2, FAlexConfig,
|
FIsTransmitting, IsOrion2, FAlexConfig,
|
||||||
FXvtrRxAntOverride, FXvtrUseRxDDCIn, FXvtrDisablePA);
|
FXvtrRxAntOverride, FXvtrUseRxDDCIn, FXvtrDisablePA,
|
||||||
|
FXvtrEnable);
|
||||||
Buf[1432] := (Alex0 shr 24) and $FF;
|
Buf[1432] := (Alex0 shr 24) and $FF;
|
||||||
Buf[1433] := (Alex0 shr 16) and $FF;
|
Buf[1433] := (Alex0 shr 16) and $FF;
|
||||||
Buf[1434] := (Alex0 shr 8) and $FF;
|
Buf[1434] := (Alex0 shr 8) and $FF;
|
||||||
|
|||||||
Reference in New Issue
Block a user