rtty/datamode change done. Still completely untested. Compiles ok.

This commit is contained in:
OH1KH 2022-09-02 17:01:00 +03:00
parent d5e27773bb
commit c079448a1b
10 changed files with 133 additions and 83 deletions

View File

@ -110,7 +110,7 @@ implementation
{$R *.lfm} {$R *.lfm}
{ TdmDXCluster } { TdmDXCluster }
uses dUtils, dData, znacmech, uMyini; uses dUtils, dData, znacmech, uMyini, fTRXControl;
type Tchyb1 = object(Tchyby) // podedim objekt a prepisu "hlaseni" type Tchyb1 = object(Tchyby) // podedim objekt a prepisu "hlaseni"
//procedure hlaseni(vzkaz,kdo:string);virtual; //procedure hlaseni(vzkaz,kdo:string);virtual;
@ -209,6 +209,7 @@ function TdmDXCluster.BandModFromFreq(freq : String;var mode,band : String) : Bo
var var
tmp : Extended; tmp : Extended;
cw, ssb : Extended; cw, ssb : Extended;
n :String;
begin begin
EnterCriticalsection(csDX); EnterCriticalsection(csDX);
try try
@ -243,7 +244,10 @@ begin
if (tmp >= ssb) then if (tmp >= ssb) then
mode := 'SSB' mode := 'SSB'
else else
mode := 'RTTY'; Begin
n:=IntToStr(frmTRXControl.cmbRig.ItemIndex);
mode := cqrini.ReadString('Band'+n, 'Datamode', 'RTTY')
end;
end; end;
//Writeln('TdmDXCluster.BandModFromFreq:',Result,' cw ',FloatToStr(cw),' ssb ',FloatToStr(ssb)) //Writeln('TdmDXCluster.BandModFromFreq:',Result,' cw ',FloatToStr(cw),' ssb ',FloatToStr(ssb))
finally finally

View File

@ -77,7 +77,7 @@ object frmChangeFreq: TfrmChangeFreq
OnKeyPress = ChkKeyPress OnKeyPress = ChkKeyPress
TabOrder = 2 TabOrder = 2
end end
object edtRTTY: TEdit object edtData: TEdit
Left = 168 Left = 168
Height = 34 Height = 34
Top = 89 Top = 89

View File

@ -17,7 +17,7 @@ type
btnCancel: TButton; btnCancel: TButton;
edtRXOffset : TEdit; edtRXOffset : TEdit;
edtCW: TEdit; edtCW: TEdit;
edtRTTY: TEdit; edtData: TEdit;
edtEnd: TEdit; edtEnd: TEdit;
edtBegin: TEdit; edtBegin: TEdit;
edtTXOffset : TEdit; edtTXOffset : TEdit;
@ -70,10 +70,10 @@ begin
exit exit
end; end;
if NOT TryStrToCurr(edtRTTY.Text,f) then if NOT TryStrToCurr(edtData.Text,f) then
begin begin
Application.MessageBox('You must enter correct frequency!','Error',mb_OK+mb_IconError); Application.MessageBox('You must enter correct frequency!','Error',mb_OK+mb_IconError);
edtRTTY.SetFocus; edtData.SetFocus;
exit exit
end; end;

View File

@ -111,7 +111,7 @@ object frmFreq: TfrmFreq
Top = 18 Top = 18
Width = 180 Width = 180
BorderSpacing.Left = 230 BorderSpacing.Left = 230
Caption = 'RTTY: (f>RTTY and f<=SSB)' Caption = 'DATA: (f>DATA and f<=SSB)'
ParentColor = False ParentColor = False
end end
object lblFreqNote4: TLabel object lblFreqNote4: TLabel

View File

@ -75,7 +75,7 @@ begin
edtBegin.Text := FloatToStr(dmData.qBands.Fields[2].AsFloat); edtBegin.Text := FloatToStr(dmData.qBands.Fields[2].AsFloat);
edtEnd.Text := FloatToStr(dmData.qBands.Fields[3].AsFloat); edtEnd.Text := FloatToStr(dmData.qBands.Fields[3].AsFloat);
edtCW.Text := FloatToStr(dmData.qBands.Fields[4].AsFloat); edtCW.Text := FloatToStr(dmData.qBands.Fields[4].AsFloat);
edtRTTY.Text := FloatToStr(dmData.qBands.Fields[5].AsFloat); edtData.Text := FloatToStr(dmData.qBands.Fields[5].AsFloat);
edtSSB.Text := FloatToStr(dmData.qBands.Fields[6].AsFloat); edtSSB.Text := FloatToStr(dmData.qBands.Fields[6].AsFloat);
edtRXOffset.Text := FloatToStr(dmData.qBands.Fields[7].AsFloat); edtRXOffset.Text := FloatToStr(dmData.qBands.Fields[7].AsFloat);
edtTXOffset.Text := FloatToStr(dmData.qBands.Fields[8].AsFloat); edtTXOffset.Text := FloatToStr(dmData.qBands.Fields[8].AsFloat);
@ -88,7 +88,7 @@ begin
StrToFloat(edtBegin.Text), StrToFloat(edtBegin.Text),
StrToFloat(edtEnd.Text), StrToFloat(edtEnd.Text),
StrToFloat(edtCW.Text), StrToFloat(edtCW.Text),
StrToFloat(edtRTTY.Text), StrToFloat(edtData.Text),
StrToFloat(edtSSB.Text), StrToFloat(edtSSB.Text),
StrToFloat(edtRXOffset.Text), StrToFloat(edtRXOffset.Text),
StrToFloat(edtTXOffset.Text) StrToFloat(edtTXOffset.Text)
@ -137,7 +137,7 @@ begin
dbgrdFreq.Columns[2].Title.Caption := 'Begin'; dbgrdFreq.Columns[2].Title.Caption := 'Begin';
dbgrdFreq.Columns[3].Title.Caption := 'End'; dbgrdFreq.Columns[3].Title.Caption := 'End';
dbgrdFreq.Columns[4].Title.Caption := 'CW'; dbgrdFreq.Columns[4].Title.Caption := 'CW';
dbgrdFreq.Columns[5].Title.Caption := 'RTTY'; dbgrdFreq.Columns[5].Title.Caption := 'Data';
dbgrdFreq.Columns[6].Title.Caption := 'SSB'; dbgrdFreq.Columns[6].Title.Caption := 'SSB';
dbgrdFreq.Columns[7].Title.Caption := 'RX offset'; dbgrdFreq.Columns[7].Title.Caption := 'RX offset';
dbgrdFreq.Columns[8].Title.Caption := 'TX offset'; dbgrdFreq.Columns[8].Title.Caption := 'TX offset';

View File

@ -674,6 +674,7 @@ type
function CheckFreq(freq : String) : String; function CheckFreq(freq : String) : String;
procedure WaitWeb(secs:integer); procedure WaitWeb(secs:integer);
function RigCmd2DataMode(mode:String):String;
procedure ShowOperator; procedure ShowOperator;
procedure StartUpRemote; procedure StartUpRemote;
procedure NewLogSplash; procedure NewLogSplash;
@ -2247,7 +2248,7 @@ begin
if (frmTRXControl.GetModeFreqNewQSO(mode,freq)) then if (frmTRXControl.GetModeFreqNewQSO(mode,freq)) then
begin begin
if( mode <> '') and chkAutoMode.Checked then if( mode <> '') and chkAutoMode.Checked then
cmbMode.Text := mode; cmbMode.Text := RigCmd2DataMode(mode);
if (freq <> empty_freq) then if (freq <> empty_freq) then
begin begin
cmbFreq.Text := freq; cmbFreq.Text := freq;
@ -5394,7 +5395,7 @@ begin
if (not (fViewQSO or fEditQSO or cbOffline.Checked)) and (frmTRXControl.GetModeFreqNewQSO(mode,freq)) then if (not (fViewQSO or fEditQSO or cbOffline.Checked)) and (frmTRXControl.GetModeFreqNewQSO(mode,freq)) then
begin begin
if chkAutoMode.Checked then if chkAutoMode.Checked then
cmbMode.Text := mode; cmbMode.Text := RigCmd2DataMode(mode);
cmbFreq.Text := freq; cmbFreq.Text := freq;
edtHisRST.SetFocus; edtHisRST.SetFocus;
edtHisRST.SelStart := 1; edtHisRST.SelStart := 1;
@ -6692,7 +6693,7 @@ begin
edtCall.Text := call; edtCall.Text := call;
cmbFreq.Text := freq; cmbFreq.Text := freq;
if chkAutoMode.Checked then if chkAutoMode.Checked then
cmbMode.Text := mode; cmbMode.Text := RigCmd2DataMode(mode);
freq := FloatToStr(etmp); freq := FloatToStr(etmp);
if not FromRbn then if not FromRbn then
mode := dmUtils.GetModeFromFreq(freq); mode := dmUtils.GetModeFromFreq(freq);
@ -7703,6 +7704,19 @@ Begin
ShowMessage(message); ShowMessage(message);
end; end;
function TfrmNewQSO.RigCmd2DataMode(mode:String):String;
var
DatCmd,
n :String;
Begin
n:=IntToStr(frmTRXControl.cmbRig.ItemIndex);
DatCmd := upcase(cqrini.ReadString('Band'+n, 'Datacmd', 'RTTY'));
if (DatCmd = 'USB') or (DatCmd = 'LSB') then DatCmd := 'SSB'; //this is what RigControl responses
if cqrini.ReadBool('Band'+n, 'UseReverse', False) and (mode = DatCmd) then
Result := cqrini.ReadString('Band'+n, 'Datamode', 'RTTY')
else Result := mode;
end;
end. end.

View File

@ -1,7 +1,7 @@
object frmPreferences: TfrmPreferences object frmPreferences: TfrmPreferences
Left = 85 Left = 20
Height = 713 Height = 712
Top = 33 Top = 35
Width = 1131 Width = 1131
HelpType = htKeyword HelpType = htKeyword
HelpKeyword = 'help/h1.html' HelpKeyword = 'help/h1.html'
@ -11,7 +11,7 @@ object frmPreferences: TfrmPreferences
AutoScroll = True AutoScroll = True
BorderIcons = [biSystemMenu] BorderIcons = [biSystemMenu]
Caption = 'Preferences' Caption = 'Preferences'
ClientHeight = 713 ClientHeight = 712
ClientWidth = 1131 ClientWidth = 1131
OnCloseQuery = FormCloseQuery OnCloseQuery = FormCloseQuery
OnCreate = FormCreate OnCreate = FormCreate
@ -20,7 +20,7 @@ object frmPreferences: TfrmPreferences
LCLVersion = '2.2.2.0' LCLVersion = '2.2.2.0'
object pgPreferences: TPageControl object pgPreferences: TPageControl
Left = 160 Left = 160
Height = 713 Height = 712
Top = 0 Top = 0
Width = 883 Width = 883
ActivePage = tabModes ActivePage = tabModes
@ -30,7 +30,7 @@ object frmPreferences: TfrmPreferences
OnChange = pgPreferencesChange OnChange = pgPreferencesChange
object tabProgram: TTabSheet object tabProgram: TTabSheet
Caption = 'Program' Caption = 'Program'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object lblWebBrowser: TLabel object lblWebBrowser: TLabel
AnchorSideLeft.Control = gbInternet AnchorSideLeft.Control = gbInternet
@ -625,7 +625,7 @@ object frmPreferences: TfrmPreferences
end end
object tabStation: TTabSheet object tabStation: TTabSheet
Caption = 'Station' Caption = 'Station'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox5: TGroupBox object GroupBox5: TGroupBox
Left = 16 Left = 16
@ -787,7 +787,7 @@ object frmPreferences: TfrmPreferences
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Caption = 'New QSO' Caption = 'New QSO'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object Label82: TLabel object Label82: TLabel
AnchorSideLeft.Control = edtRecetQSOs AnchorSideLeft.Control = edtRecetQSOs
@ -1264,7 +1264,7 @@ object frmPreferences: TfrmPreferences
end end
object tabVisibleColumns: TTabSheet object tabVisibleColumns: TTabSheet
Caption = 'Visible columns' Caption = 'Visible columns'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object chkDate: TCheckBox object chkDate: TCheckBox
AnchorSideLeft.Control = tabVisibleColumns AnchorSideLeft.Control = tabVisibleColumns
@ -1853,7 +1853,7 @@ object frmPreferences: TfrmPreferences
end end
object tabBands: TTabSheet object tabBands: TTabSheet
Caption = 'Bands' Caption = 'Bands'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object cb136kHz: TCheckBox object cb136kHz: TCheckBox
Left = 14 Left = 14
@ -2100,7 +2100,7 @@ object frmPreferences: TfrmPreferences
end end
object tabTRXcontrol: TTabSheet object tabTRXcontrol: TTabSheet
Caption = 'TRX control' Caption = 'TRX control'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object btnChangeDefaultFreq: TButton object btnChangeDefaultFreq: TButton
AnchorSideTop.Control = grbRadio AnchorSideTop.Control = grbRadio
@ -2140,7 +2140,7 @@ object frmPreferences: TfrmPreferences
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 4 BorderSpacing.Top = 4
Caption = ' rigctld ' Caption = ' rigctld '
ClientHeight = 70 ClientHeight = 86
ClientWidth = 655 ClientWidth = 655
TabOrder = 0 TabOrder = 0
object lblRigctdPath: TLabel object lblRigctdPath: TLabel
@ -2374,7 +2374,7 @@ object frmPreferences: TfrmPreferences
Width = 511 Width = 511
BorderSpacing.Top = 3 BorderSpacing.Top = 3
Caption = 'Radio one serial parameters' Caption = 'Radio one serial parameters'
ClientHeight = 130 ClientHeight = 146
ClientWidth = 509 ClientWidth = 509
TabOrder = 11 TabOrder = 11
object lblSerialRSpd: TLabel object lblSerialRSpd: TLabel
@ -2869,7 +2869,7 @@ object frmPreferences: TfrmPreferences
end end
object TabROTcontrol: TTabSheet object TabROTcontrol: TTabSheet
Caption = 'ROT control' Caption = 'ROT control'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox41: TGroupBox object GroupBox41: TGroupBox
AnchorSideLeft.Control = TabROTcontrol AnchorSideLeft.Control = TabROTcontrol
@ -3843,7 +3843,7 @@ object frmPreferences: TfrmPreferences
end end
object tabModes: TTabSheet object tabModes: TTabSheet
Caption = 'Modes' Caption = 'Modes'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object grpUsrDigitalModes: TGroupBox object grpUsrDigitalModes: TGroupBox
AnchorSideLeft.Control = tabModes AnchorSideLeft.Control = tabModes
@ -4142,8 +4142,9 @@ object frmPreferences: TfrmPreferences
BorderSpacing.Left = 30 BorderSpacing.Left = 30
Caption = 'Data' Caption = 'Data'
ParentColor = False ParentColor = False
OnClick = lblDataModeClick
end end
object lblLogMode: TLabel object lblLogDataMode: TLabel
AnchorSideLeft.Control = lblDataMode AnchorSideLeft.Control = lblDataMode
AnchorSideTop.Control = edtCW AnchorSideTop.Control = edtCW
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
@ -4154,8 +4155,8 @@ object frmPreferences: TfrmPreferences
Caption = 'Log Mode' Caption = 'Log Mode'
ParentColor = False ParentColor = False
end end
object lblRigMode: TLabel object lblRigDataCmd: TLabel
AnchorSideLeft.Control = lblLogMode AnchorSideLeft.Control = lblLogDataMode
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 207 Left = 207
Height = 17 Height = 17
@ -4175,10 +4176,11 @@ object frmPreferences: TfrmPreferences
BorderSpacing.Left = 42 BorderSpacing.Left = 42
Caption = 'Mode ' Caption = 'Mode '
ParentColor = False ParentColor = False
OnClick = lblDataMode1Click
end end
object edtLogMode: TEdit object edtDataMode: TEdit
AnchorSideLeft.Control = lblDataMode1 AnchorSideLeft.Control = lblDataMode1
AnchorSideTop.Control = lblLogMode AnchorSideTop.Control = lblLogDataMode
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 280 Left = 280
Height = 34 Height = 34
@ -4191,9 +4193,9 @@ object frmPreferences: TfrmPreferences
TabOrder = 6 TabOrder = 6
Text = 'RTTY' Text = 'RTTY'
end end
object edtRigCmd: TEdit object edtDataCmd: TEdit
AnchorSideLeft.Control = edtLogMode AnchorSideLeft.Control = edtDataMode
AnchorSideTop.Control = lblRigMode AnchorSideTop.Control = lblRigDataCmd
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 280 Left = 280
Height = 34 Height = 34
@ -4224,7 +4226,7 @@ object frmPreferences: TfrmPreferences
Visible = False Visible = False
end end
object chkModeReverse: TCheckBox object chkModeReverse: TCheckBox
AnchorSideLeft.Control = lblRigMode AnchorSideLeft.Control = lblRigDataCmd
AnchorSideTop.Control = lblDataHz AnchorSideTop.Control = lblDataHz
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 207 Left = 207
@ -4251,7 +4253,7 @@ object frmPreferences: TfrmPreferences
end end
object tabQTHProfiles: TTabSheet object tabQTHProfiles: TTabSheet
Caption = 'QTH Profiles' Caption = 'QTH Profiles'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object chkUseProfiles: TCheckBox object chkUseProfiles: TCheckBox
Left = 9 Left = 9
@ -4356,7 +4358,7 @@ object frmPreferences: TfrmPreferences
end end
object tabExport: TTabSheet object tabExport: TTabSheet
Caption = 'Export' Caption = 'Export'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
inline fraExportPref1: TfraExportPref inline fraExportPref1: TfraExportPref
Top = 8 Top = 8
@ -4374,7 +4376,7 @@ object frmPreferences: TfrmPreferences
end end
object tabDXCluster: TTabSheet object tabDXCluster: TTabSheet
Caption = 'DXCluster' Caption = 'DXCluster'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object gbDXCColor: TGroupBox object gbDXCColor: TGroupBox
AnchorSideLeft.Control = tabDXCluster AnchorSideLeft.Control = tabDXCluster
@ -4992,7 +4994,7 @@ object frmPreferences: TfrmPreferences
end end
object tabFont: TTabSheet object tabFont: TTabSheet
Caption = 'Fonts' Caption = 'Fonts'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox7: TGroupBox object GroupBox7: TGroupBox
Left = 14 Left = 14
@ -5203,7 +5205,7 @@ object frmPreferences: TfrmPreferences
end end
object tabWazItu: TTabSheet object tabWazItu: TTabSheet
Caption = 'WAZ, ITU zones' Caption = 'WAZ, ITU zones'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox8: TGroupBox object GroupBox8: TGroupBox
Left = 14 Left = 14
@ -5346,7 +5348,7 @@ object frmPreferences: TfrmPreferences
end end
object tabIOTA: TTabSheet object tabIOTA: TTabSheet
Caption = 'IOTA' Caption = 'IOTA'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox10: TGroupBox object GroupBox10: TGroupBox
Left = 22 Left = 22
@ -5403,7 +5405,7 @@ object frmPreferences: TfrmPreferences
end end
object tabMemebership: TTabSheet object tabMemebership: TTabSheet
Caption = 'Membership' Caption = 'Membership'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox11: TGroupBox object GroupBox11: TGroupBox
AnchorSideLeft.Control = tabMemebership AnchorSideLeft.Control = tabMemebership
@ -5845,7 +5847,7 @@ object frmPreferences: TfrmPreferences
end end
object tabBandMap: TTabSheet object tabBandMap: TTabSheet
Caption = 'Bandmap' Caption = 'Bandmap'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox16: TGroupBox object GroupBox16: TGroupBox
Left = 13 Left = 13
@ -6164,7 +6166,7 @@ object frmPreferences: TfrmPreferences
end end
object tabXplanet: TTabSheet object tabXplanet: TTabSheet
Caption = 'xplanet support' Caption = 'xplanet support'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox21: TGroupBox object GroupBox21: TGroupBox
Left = 14 Left = 14
@ -6440,7 +6442,7 @@ object frmPreferences: TfrmPreferences
end end
object tabZipCode: TTabSheet object tabZipCode: TTabSheet
Caption = 'Zip code tracking' Caption = 'Zip code tracking'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox25: TGroupBox object GroupBox25: TGroupBox
Left = 6 Left = 6
@ -6697,7 +6699,7 @@ object frmPreferences: TfrmPreferences
end end
object tabLoTW: TTabSheet object tabLoTW: TTabSheet
Caption = 'LoTW/eQSL support' Caption = 'LoTW/eQSL support'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object lblLoTWBkg: TLabel object lblLoTWBkg: TLabel
AnchorSideLeft.Control = cmbLoTWBckColor AnchorSideLeft.Control = cmbLoTWBckColor
@ -7039,7 +7041,7 @@ object frmPreferences: TfrmPreferences
end end
object tabCWInterface: TTabSheet object tabCWInterface: TTabSheet
Caption = 'CW interface' Caption = 'CW interface'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object lbIfaceType: TLabel object lbIfaceType: TLabel
AnchorSideLeft.Control = tabCWInterface AnchorSideLeft.Control = tabCWInterface
@ -7654,7 +7656,7 @@ object frmPreferences: TfrmPreferences
end end
object tabFldigi1: TTabSheet object tabFldigi1: TTabSheet
Caption = 'fldigi/wsjt interface' Caption = 'fldigi/wsjt interface'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox31: TGroupBox object GroupBox31: TGroupBox
AnchorSideLeft.Control = tabFldigi1 AnchorSideLeft.Control = tabFldigi1
@ -8342,7 +8344,7 @@ object frmPreferences: TfrmPreferences
end end
object tabAutoBackup: TTabSheet object tabAutoBackup: TTabSheet
Caption = 'Exit & Auto backup' Caption = 'Exit & Auto backup'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox32: TGroupBox object GroupBox32: TGroupBox
Left = 8 Left = 8
@ -8490,7 +8492,7 @@ object frmPreferences: TfrmPreferences
end end
object tabExtViewers: TTabSheet object tabExtViewers: TTabSheet
Caption = 'External viewers' Caption = 'External viewers'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object Label99: TLabel object Label99: TLabel
Left = 23 Left = 23
@ -8578,7 +8580,7 @@ object frmPreferences: TfrmPreferences
end end
object tabCallbook: TTabSheet object tabCallbook: TTabSheet
Caption = 'Callbook support' Caption = 'Callbook support'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox38: TGroupBox object GroupBox38: TGroupBox
Left = 13 Left = 13
@ -8643,7 +8645,7 @@ object frmPreferences: TfrmPreferences
end end
object tabRBN: TTabSheet object tabRBN: TTabSheet
Caption = 'RBN support' Caption = 'RBN support'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object chkRBNAutoConn: TCheckBox object chkRBNAutoConn: TCheckBox
AnchorSideLeft.Control = lblRbnWindowOpen AnchorSideLeft.Control = lblRbnWindowOpen
@ -8962,7 +8964,7 @@ object frmPreferences: TfrmPreferences
end end
object tabOnlineLog: TTabSheet object tabOnlineLog: TTabSheet
Caption = 'Online log upload' Caption = 'Online log upload'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object GroupBox44: TGroupBox object GroupBox44: TGroupBox
Left = 13 Left = 13
@ -9264,7 +9266,7 @@ object frmPreferences: TfrmPreferences
end end
object tabCondx: TTabSheet object tabCondx: TTabSheet
Caption = 'Propagation' Caption = 'Propagation'
ClientHeight = 682 ClientHeight = 681
ClientWidth = 873 ClientWidth = 873
object rbCondxAsImage: TRadioButton object rbCondxAsImage: TRadioButton
Left = 25 Left = 25
@ -9337,11 +9339,11 @@ object frmPreferences: TfrmPreferences
object Panel1: TPanel object Panel1: TPanel
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 1043 Left = 1043
Height = 713 Height = 712
Top = 0 Top = 0
Width = 88 Width = 88
Align = alRight Align = alRight
ClientHeight = 713 ClientHeight = 712
ClientWidth = 88 ClientWidth = 88
TabOrder = 1 TabOrder = 1
object btnOK: TButton object btnOK: TButton
@ -9406,7 +9408,7 @@ object frmPreferences: TfrmPreferences
end end
object lbPreferences: TListBox object lbPreferences: TListBox
Left = 0 Left = 0
Height = 713 Height = 712
Top = 0 Top = 0
Width = 160 Width = 160
Align = alLeft Align = alLeft

View File

@ -508,8 +508,8 @@ type
DateEditCall: TDateEdit; DateEditCall: TDateEdit;
DateEditLoc: TDateEdit; DateEditLoc: TDateEdit;
dlgColor : TColorDialog; dlgColor : TColorDialog;
edtLogMode: TEdit; edtDataMode: TEdit;
edtRigCmd: TEdit; edtDataCmd: TEdit;
edtGCLineWidth: TEdit; edtGCLineWidth: TEdit;
edtGCStep: TEdit; edtGCStep: TEdit;
edtGCPolarDivisor: TEdit; edtGCPolarDivisor: TEdit;
@ -715,8 +715,8 @@ type
lblNoRigForMode: TLabel; lblNoRigForMode: TLabel;
lblDataMode: TLabel; lblDataMode: TLabel;
lblDataMode1: TLabel; lblDataMode1: TLabel;
lblLogMode: TLabel; lblLogDataMode: TLabel;
lblRigMode: TLabel; lblRigDataCmd: TLabel;
lblRName: TLabel; lblRName: TLabel;
lblDeviceR: TLabel; lblDeviceR: TLabel;
lblExtra: TLabel; lblExtra: TLabel;
@ -1068,6 +1068,8 @@ type
procedure edtLocExit(Sender: TObject); procedure edtLocExit(Sender: TObject);
procedure edtPdfFilesExit(Sender: TObject); procedure edtPdfFilesExit(Sender: TObject);
procedure edtRecetQSOsKeyPress(Sender: TObject; var Key: char); procedure edtRecetQSOsKeyPress(Sender: TObject; var Key: char);
procedure lblDataMode1Click(Sender: TObject);
procedure lblDataModeClick(Sender: TObject);
procedure RotorParamsChange(Sender: TObject); procedure RotorParamsChange(Sender: TObject);
procedure TRXParamsChange(Sender: TObject); procedure TRXParamsChange(Sender: TObject);
procedure edtTxtFilesExit(Sender: TObject); procedure edtTxtFilesExit(Sender: TObject);
@ -2611,6 +2613,16 @@ begin
key := #0; key := #0;
end; end;
procedure TfrmPreferences.lblDataMode1Click(Sender: TObject);
begin
end;
procedure TfrmPreferences.lblDataModeClick(Sender: TObject);
begin
end;
procedure TfrmPreferences.TRXParamsChange(Sender: TObject); procedure TfrmPreferences.TRXParamsChange(Sender: TObject);
begin begin
TRXChanged := True TRXChanged := True
@ -3367,8 +3379,8 @@ Begin
edtData.Value := cqrini.ReadInteger('Band'+nr, 'RTTY', 500); //note: Data is called rtty for backward compatibility edtData.Value := cqrini.ReadInteger('Band'+nr, 'RTTY', 500); //note: Data is called rtty for backward compatibility
edtAM.Value := cqrini.ReadInteger('Band'+nr, 'AM', 3000); edtAM.Value := cqrini.ReadInteger('Band'+nr, 'AM', 3000);
edtFM.Value := cqrini.ReadInteger('Band'+nr, 'FM', 2500); edtFM.Value := cqrini.ReadInteger('Band'+nr, 'FM', 2500);
edtLogMode.Text:=cqrini.ReadString('Band'+nr, 'LogMode', 'RTTY'); edtDataMode.Text:=cqrini.ReadString('Band'+nr, 'Datamode', 'RTTY');
edtRigCmd.Text:=cqrini.ReadString('Band'+nr, 'RigCmd', 'RTTY'); edtDataCmd.Text:=cqrini.ReadString('Band'+nr, 'Datacmd', 'RTTY');
chkModeReverse.Checked :=cqrini.ReadBool('Band'+nr, 'UseReverse', False); chkModeReverse.Checked :=cqrini.ReadBool('Band'+nr, 'UseReverse', False);
BandWNrLoaded := RigNr; BandWNrLoaded := RigNr;
end; end;
@ -3383,8 +3395,8 @@ Begin
cqrini.WriteInteger('Band'+nr, 'RTTY', edtData.Value); //note: Data is called rtty for backward compatibility cqrini.WriteInteger('Band'+nr, 'RTTY', edtData.Value); //note: Data is called rtty for backward compatibility
cqrini.WriteInteger('Band'+nr, 'AM', edtAM.Value); cqrini.WriteInteger('Band'+nr, 'AM', edtAM.Value);
cqrini.WriteInteger('Band'+nr, 'FM', edtFM.Value); cqrini.WriteInteger('Band'+nr, 'FM', edtFM.Value);
cqrini.WriteString('Band'+nr, 'LogMode', edtLogMode.Text); cqrini.WriteString('Band'+nr, 'Datamode', edtDataMode.Text);
cqrini.WriteString('Band'+nr, 'RigCmd', edtRigCmd.Text); cqrini.WriteString('Band'+nr, 'Datacmd', edtDatacmd.Text);
cqrini.WriteBool('Band'+nr, 'UseReverse', chkModeReverse.Checked); cqrini.WriteBool('Band'+nr, 'UseReverse', chkModeReverse.Checked);
end; end;

View File

@ -1,7 +1,7 @@
object frmTRXControl: TfrmTRXControl object frmTRXControl: TfrmTRXControl
Left = 732 Left = 950
Height = 302 Height = 302
Top = 27 Top = 29
Width = 265 Width = 265
Anchors = [] Anchors = []
Caption = 'TRX control' Caption = 'TRX control'

View File

@ -158,6 +158,7 @@ type
procedure SetMode(mode : String; bandwidth : Integer); procedure SetMode(mode : String; bandwidth : Integer);
procedure ClearButtonsColor; procedure ClearButtonsColor;
procedure UpdateModeButtons(mode : String); procedure UpdateModeButtons(mode : String);
procedure CheckUserMode(var mode : String);
procedure UserButton(r, b : Char); procedure UserButton(r, b : Char);
public public
AutoMode : Boolean; AutoMode : Boolean;
@ -1134,6 +1135,7 @@ procedure TfrmTRXControl.SetMode(mode : String; bandwidth : Integer);
var var
rmode : TRigMode; rmode : TRigMode;
begin begin
CheckUserMode(mode);
if Assigned(radio) then if Assigned(radio) then
begin begin
rmode.mode := mode; rmode.mode := mode;
@ -1313,6 +1315,7 @@ begin
mode := 'LSB'; mode := 'LSB';
end; end;
end; end;
CheckUserMode(mode);
if Assigned(radio) then if Assigned(radio) then
begin begin
@ -1413,26 +1416,27 @@ begin
end; end;
procedure TfrmTRXControl.UpdateModeButtons(mode : String); procedure TfrmTRXControl.UpdateModeButtons(mode : String);
var
usermode :String;
n :String;
begin begin
btnCW.Font.Color := COLOR_WINDOWTEXT; btnCW.Font.Color := COLOR_WINDOWTEXT;
btnSSB.Font.Color := COLOR_WINDOWTEXT; btnSSB.Font.Color := COLOR_WINDOWTEXT;
btnDATA.Font.Color := COLOR_WINDOWTEXT; btnDATA.Font.Color := COLOR_WINDOWTEXT;
btnAM.Font.Color := COLOR_WINDOWTEXT; btnAM.Font.Color := COLOR_WINDOWTEXT;
btnFM.Font.Color := COLOR_WINDOWTEXT; btnFM.Font.Color := COLOR_WINDOWTEXT;
if mode = 'CW' then
btnCW.Font.Color := clRed n:=IntToStr(cmbRig.ItemIndex);
else usermode:=cqrini.ReadString('Band'+n, 'Datacmd', 'RTTY');
if mode = 'SSB' then
btnSSB.Font.Color := clRed if mode = usermode then btnDATA.Font.Color := clRed
else else
if mode = 'RTTY' then case mode of
btnDATA.Font.Color := clRed 'CW' : btnCW.Font.Color := clRed;
else 'SSB' : btnSSB.Font.Color := clRed;
if mode = 'AM' then 'AM' : btnAM.Font.Color := clRed;
btnAM.Font.Color := clRed 'FM' : btnFM.Font.Color := clRed;
else end;
if mode = 'FM' then
btnFM.Font.Color := clRed;
if Assigned(radio) then if Assigned(radio) then
begin begin
@ -1589,5 +1593,19 @@ begin
btn70CMBand := dmUtils.GetBandFromFreq( btn70CMBand := dmUtils.GetBandFromFreq(
FloatToStr(cqrini.ReadFloat('DefFreq', '70cw', 430000) / 1000)); FloatToStr(cqrini.ReadFloat('DefFreq', '70cw', 430000) / 1000));
end; end;
procedure TfrmTRXControl.CheckUserMode(var mode : String);
var
usermode,
usercmd,
n :String;
begin
n:=IntToStr(cmbRig.ItemIndex);
usercmd:=cqrini.ReadString('Band'+n, 'Datacmd', 'RTTY');
usermode:=cqrini.ReadString('Band'+n, 'Datamode', 'RTTY');
if ((Upcase(mode)='RTTY') or (Upcase(mode)=Upcase(usermode))) then
mode := usercmd;
end;
end. end.