after change 'Default frequencies', related button in TRX control window didn't go red - fixed

This commit is contained in:
Petr Hlozek 2016-04-03 07:36:03 +02:00
parent 865b69e8db
commit 3b58ee98eb
6 changed files with 53 additions and 19 deletions

View File

@ -24,6 +24,7 @@ Legend:
- fixed loading of MASTER.SCP after downloading new DXCC tables
- QSO with mode in lower case was market as error and not imported - fixed
- band map didn't show any data on SSB - fixed
- after change "Default frequencies", related button in TRX control window didn't go red - fixed
1.9.1 (2015-11-28)
+ support sending CW via HamLib library added

View File

@ -190,11 +190,11 @@ begin
edt2fm.Text := cqrini.ReadString('DefFreq','2fm','145300');
edt70btn.Text := cqrini.ReadString('DefFreq','70btn','70cm');
edt70cw.Text := cqrini.ReadString('DefFreq','70cw','3525');
edt70ssb.Text := cqrini.ReadString('DefFreq','70ssb','3525');
edt70rtty.Text := cqrini.ReadString('DefFreq','70rtty','3525');
edt70am.Text := cqrini.ReadString('DefFreq','70am','3525');
edt70fm.Text := cqrini.ReadString('DefFreq','70fm','3525')
edt70cw.Text := cqrini.ReadString('DefFreq','70cw','430000');
edt70ssb.Text := cqrini.ReadString('DefFreq','70ssb','430000');
edt70rtty.Text := cqrini.ReadString('DefFreq','70rtty','430000');
edt70am.Text := cqrini.ReadString('DefFreq','70am','430000');
edt70fm.Text := cqrini.ReadString('DefFreq','70fm','430000')
end;
procedure TfrmDefaultFreq.btnOKClick(Sender: TObject);

View File

@ -1683,6 +1683,7 @@ begin
frmTRXControl.InicializeRig;
frmTRXControl.LoadButtonCaptions;
frmTRXControl.LoadBandButtons;
frmNewQSO.ClearAfterFreqChange := False;//cqrini.ReadBool('NewQSO','ClearAfterFreqChange',False);
frmNewQSO.ChangeFreqLimit := cqrini.ReadFloat('NewQSO','FreqChange',0.010);

View File

@ -152,7 +152,7 @@ object frmTRXControl: TfrmTRXControl
OnKeyDown = FormKeyDown
OnKeyUp = FormKeyUp
OnShow = FormShow
LCLVersion = '1.4.4.0'
LCLVersion = '1.6.0.4'
object GroupBox2: TGroupBox
Left = 256
Height = 233

View File

@ -200,7 +200,7 @@ LazarusResources.Add('TfrmTRXControl','FORMDATA',[
+#0#0#0#0#0#0#0#0#0#10'KeyPreview'#9#4'Menu'#7#6'mnuMem'#7'OnClose'#7#9'FormC'
+'lose'#12'OnCloseQuery'#7#14'FormCloseQuery'#8'OnCreate'#7#10'FormCreate'#9
+'OnDestroy'#7#11'FormDestroy'#9'OnKeyDown'#7#11'FormKeyDown'#7'OnKeyUp'#7#9
+'FormKeyUp'#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#7'1.4.4.0'#0#9'TGroupBo'
+'FormKeyUp'#6'OnShow'#7#8'FormShow'#10'LCLVersion'#6#7'1.6.0.4'#0#9'TGroupBo'
+'x'#9'GroupBox2'#4'Left'#3#0#1#6'Height'#3#233#0#3'Top'#2#0#5'Width'#2'S'#5
+'Align'#7#7'alRight'#7'Caption'#6#6' Mode '#12'ClientHeight'#3#214#0#11'Clie'
+'ntWidth'#2'O'#8'TabOrder'#2#0#0#7'TButton'#5'btnCW'#4'Left'#2#14#6'Height'#2

View File

@ -97,6 +97,20 @@ type
private
radio : TRigControl;
old_mode : String;
btn160MBand : String;
btn80MBand : String;
btn40MBand : String;
btn30MBand : String;
btn20MBand : String;
btn17MBand : String;
btn15MBand : String;
btn12MBand : String;
btn10MBand : String;
btn6MBand : String;
btn2MBand : String;
btn70CMBand : String;
function GetActualMode : String;
function GetModeNumber(mode : String) : Cardinal;
procedure SetMode(mode : String;bandwidth :Integer);
@ -138,6 +152,7 @@ type
procedure ClearRIT;
procedure LoadButtonCaptions;
procedure SetDebugMode(DebugMode : Boolean);
procedure LoadBandButtons;
end;
{
@ -329,29 +344,29 @@ begin
if (b='') then
b := dmUtils.GetBandFromFreq(lblFreq.Caption);
if b = '160M' then
if b = btn160MBand then
btn160m.Font.Color := clRed
else if b = '80M' then
else if b = btn80MBand then
btn80m.Font.Color := clRed
else if b = '40M' then
else if b = btn40MBand then
btn40m.Font.Color := clRed
else if b = '30M' then
else if b = btn30MBand then
btn30m.Font.Color := clRed
else if b = '20M' then
else if b = btn20MBand then
btn20m.Font.Color := clRed
else if b = '17M' then
else if b = btn17MBand then
btn17m.Font.Color := clRed
else if b = '15M' then
else if b = btn15MBand then
btn15m.Font.Color := clRed
else if b = '12M' then
else if b = btn12MBand then
btn12m.Font.Color := clRed
else if b = '10M' then
else if b = btn10MBand then
btn10m.Font.Color := clRed
else if b = '6M' then
else if b = btn6MBand then
btn6m.Font.Color := clRed
else if b = '2M' then
else if b = btn2MBand then
btn2m.Font.Color := clRed
else if b = '70CM' then
else if b = btn70CMBand then
btn70cm.Font.Color := clRed;
frmGrayline.band := b;
frmBandMap.CurrentBand := b;
@ -404,6 +419,7 @@ end;
procedure TfrmTRXControl.FormShow(Sender: TObject);
begin
LoadButtonCaptions;
LoadBandButtons;
dmUtils.LoadWindowPos(frmTRXControl);
rbRadio1.Caption := cqrini.ReadString('TRX1','Desc','Radio 1');
rbRadio2.Caption := cqrini.ReadString('TRX2','Desc','Radio 2');
@ -1155,6 +1171,22 @@ begin
Result := ''
end;
procedure TfrmTRXControl.LoadBandButtons;
begin
btn160MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','160cw',1830)/1000));
btn80MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','80cw',3525)/1000));
btn40MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','40cw',7015)/1000));
btn30MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','30cw',10110)/1000));
btn20MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','20cw',14025)/1000));
btn17MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','17cw',18080)/1000));
btn15MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','15cw',21025)/1000));
btn12MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','12cw',24895)/1000));
btn10MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','10cw',28025)/1000));
btn6MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','6cw',50090)/1000));
btn2MBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','2cw',144050)/1000));
btn70CMBand := dmUtils.GetBandFromFreq(FloatToStr(cqrini.ReadFloat('DefFreq','70cw',430000)/1000))
end;
initialization
{$I fTRXControl.lrs}