-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathRadioSet.cpp
More file actions
593 lines (567 loc) · 18.2 KB
/
RadioSet.cpp
File metadata and controls
593 lines (567 loc) · 18.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
//Copyright+LGPL
//-----------------------------------------------------------------------------------------------------------------------------------------------
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
//-----------------------------------------------------------------------------------------------------------------------------------------------
// This file is part of MMVARI.
// MMVARI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
// MMVARI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
// <http://www.gnu.org/licenses/>.
//-----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "RadioSet.h"
#include "Main.h"
//---------------------------------------------------------------------
#pragma resource "*.dfm"
LPCSTR __MK[]={
"YAESU FT-1000D, 1000MP, 920", //AA6YQ 1.66 cosmetic, MakerIndex=0
"YAESU FT-9000, 2000, 950, 450", //AA6YQ 1.66 , MakerIndex=1
"YAESU FT-736, 817, 847, 857, 897", //AA6YQ 1.66 cosmetic, MakerIndex=2
"Icom xx=addr 01-7F", // , MakerIndex=3
"Ten-Tec Omni VI xx=addr 00-64", // , MakerIndex=4
"Kenwood, Elecraft ", // , MakerIndex=5
"JRC JST-245", // , MakerIndex=6
"Clear", // , MakerIndex=6
NULL, // , MakerIndex=8
};
LPCSTR __MT[][3]={
{"", "\\$000000000F", "\\$000000010F\\w10" },
{"", "TX0;", "TX1;\\w10" }, //AA6YQ 1.66
{"\\$0000000000", "\\$0000000088", "\\$0000000008\\w10" },
{"", "\\$FEFExxE01C0000FD", "\\$FEFExxE01C0001FD\\w10" },
{"", "\\$FEFExxE01602FD", "\\$FEFExxE01601FD\\w10" },
{"", "RX;", "TX;\\w10" },
{"", "H1\\rX0\\rH0\\r", "H1\\rX1\\rH0\\r\\w10" },
{"", "", "" },
};
#define MAKER_UNKNOWN 7
typedef struct {
LPCSTR pKey;
int r;
}POLLDEF;
const POLLDEF __VT0[]={
{ "NONE", 0 },
{ "FT-1000MP", RADIO_POLLYAESUHF },
{ "FT-1000D", RADIO_POLLFT1000D },
{ "FT-920", RADIO_POLLFT920 },
{ NULL, 0 },
};
const POLLDEF __VT1[]={
{ "NONE", 0 },
{ "FT-9000", RADIO_POLLFT9000 }, //1.66B AA6YQ
{ "FT-2000", RADIO_POLLFT2000 }, //1.66B AA6YQ
{ "FT-950", RADIO_POLLFT950 }, //1.66B AA6YQ
{ "FT-450", RADIO_POLLFT450 }, //1.66B AA6YQ
{ NULL, 0 },
};
const POLLDEF __VT2[]={
{ "NONE", 0 },
{ "FT-817, 847, 857, 897", RADIO_POLLYAESUVU },
{ NULL, 0 },
};
const POLLDEF __VT3[]={
{ "NONE", 0 },
{ "ICOM CI-V", RADIO_POLLICOM },
{ "ICOM CI-V (no inquiry)", RADIO_POLLICOMN },
{ NULL, 0 },
};
const POLLDEF __VT4[]={
{ "NONE", 0 },
{ "Ten-Tec Omni VI", RADIO_POLLOMNIVI },
{ "Ten-Tec Omni VI (no inquiry)", RADIO_POLLOMNIVIN },
{ NULL, 0 },
};
const POLLDEF __VT5[]={
{ "NONE", 0 },
{ "KENWOOD", RADIO_POLLKENWOOD },
{ "KENWOOD (use auto info)", RADIO_POLLKENWOODN },
{ NULL, 0 },
};
const POLLDEF __VT6[]={
{ "NONE", 0 },
{ "JST245", RADIO_POLLJST245 },
{ "JST245 (use auto info)", RADIO_POLLJST245N },
{ NULL, 0 },
};
const POLLDEF __VTUNKNOWN[]={
{ "NONE", 0 },
{ "YAESU FT-1000MP", RADIO_POLLYAESUHF },
{ "YAESU FT-1000D", RADIO_POLLFT1000D },
{ "YAESU FT-920", RADIO_POLLFT920 },
{ "YAESU FT-817, 847, 857, 897", RADIO_POLLYAESUVU },
{ "YAESU FT-9000", RADIO_POLLFT9000 }, //1.66B AA6YQ
{ "YAESU FT-2000", RADIO_POLLFT2000 }, //1.66B AA6YQ
{ "YAESU FT-950", RADIO_POLLFT950 }, //1.66B AA6YQ
{ "YAESU FT-450", RADIO_POLLFT450 }, //1.66B AA6YQ
{ "ICOM CI-V", RADIO_POLLICOM },
{ "ICOM CI-V (no inquiry)", RADIO_POLLICOMN },
{ "Ten-Tec Omni VI", RADIO_POLLOMNIVI },
{ "Ten-Tec Omni VI (no inquiry)", RADIO_POLLOMNIVIN },
{ "KENWOOD", RADIO_POLLKENWOOD },
{ "KENWOOD (use auto info)", RADIO_POLLKENWOODN },
{ "JST245", RADIO_POLLJST245 },
{ "JST245 (use auto info)", RADIO_POLLJST245N },
{ NULL, 0 },
};
const POLLDEF *__VL[]={
__VT0, __VT1, __VT2, __VT3, __VT4, __VT5, __VT6, __VTUNKNOWN, NULL,
};
//---------------------------------------------------------------------
__fastcall TRADIOSetDlg::TRADIOSetDlg(TComponent* AOwner)
: TForm(AOwner)
{
FormStyle = ((TForm *)AOwner)->FormStyle;
Font->Name = ((TForm *)AOwner)->Font->Name;
Font->Charset = ((TForm *)AOwner)->Font->Charset;
if( sys.m_MsgEng ){
Caption = "Radio command";
CancelBtn->Caption = "Cancel";
GB1->Caption = "Port definition";
GCmd->Caption = "Rig and commands";
LVFO->Caption = "VFO polling";
LInt->Caption = "Polling interval";
RGFS->Caption = "Frequency offset";
AddrScan->Caption = "Scan addr.";
BitLen->Hint = "Choose 8Bits";
Parity->Hint = "Choose None";
GB3->Hint = "Uncheck both boxes (It might be FB)";
GB2->Hint = "Check this, if you control PTT with the signal line";
PortName->Hint = "Put the port name";
Baud->Hint = "4800bps is normal";
ByteWait->Hint = "Choose 0ms with recent Rig";
Maker->Hint = "Rig type";
AddrScan->Hint = "Check this, if you don't know Rig-address";
Cmdxx->Hint = "Rig-address (It depends on the Rig)";
CmdInit->Hint = "Initialization command (FT847 is required)";
CmdRx->Hint = "PTT to RX command";
CmdTx->Hint = "PTT to TX command";
VFOType->Hint = "Rig name of VFO polling";
PollInt->Hint = "Choose long time if the frequency is disguised";
RGFS->Hint = "Frequency correction by the mode";
}
int i;
for( i = 0; __MK[i] != NULL; i++ ){
Maker->Items->Add(__MK[i]);
}
m_InitWidth = CmdInit->Width;
m_PollType = 0;
m_Maker = 0;
m_MMList.QueryList("MMR");
for( int i = 0; i < m_MMList.GetCount(); i++ ){
PortName->Items->Insert(1, m_MMList.GetItemName(i));
}
PortName->DropDownCount = PortName->Items->Count;
FormCenter(this);
m_DisEvent = 0;
}
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::DisplayHint(TObject *Sender)
{
LH->Caption = GetLongHint(Application->Hint);
}
//---------------------------------------------------------------------
void __fastcall TRADIOSetDlg::UpdateUI(void)
{
int f;
if( !strcmpi(AnsiString(PortName->Text).c_str(), "PSKGNR")|| //JA7UDE 0428
!strcmpi(AnsiString(PortName->Text).c_str(), "WD5GNR")||
!strcmpi(AnsiString(PortName->Text).c_str(), "LOGGER") ){
GCmd->Visible = FALSE;
if( !strcmpi(AnsiString(PortName->Text).c_str(), "LOGGER") ){ //JA7UDE 0428
GGNR->Visible = FALSE;
// LTNX->Caption = "Thanks to Bob Furzer (K4CY) who is releasing the fine programs.";
}
else {
GGNR->Visible = TRUE;
// LTNX->Caption = "Thanks to Al Williams (WD5GNR) who is releasing the fine programs.";
}
LGNR->Visible = OpenGNR->Checked;
CmdGNR->Visible = OpenGNR->Checked;
RefBtn->Visible = OpenGNR->Checked;
LPTT->Visible = OpenGNR->Checked;
Maker->Visible = FALSE;
LoadBtn->Visible = FALSE;
SaveBtn->Visible = FALSE;
f = FALSE;
}
else {
GGNR->Visible = FALSE;
GCmd->Visible = TRUE;
Maker->Visible = TRUE;
LoadBtn->Visible = TRUE;
SaveBtn->Visible = TRUE;
f = IsXX();
Lxx->Visible = f;
Cmdxx->Visible = f;
AddrScan->Enabled = f && m_PollType;
if( f ){
CmdInit->Width = m_InitWidth;
}
else {
CmdInit->Width = CmdRx->Width;
}
RGFS->Enabled = m_PollType;
LInt->Enabled = m_PollType;
LInts->Enabled = m_PollType;
PollInt->Enabled = m_PollType;
f = (m_MMList.IndexOf(AnsiString(PortName->Text).c_str()) < 0) ? TRUE : FALSE; //JA7UDE 0428
}
Label2->Enabled = f;
Baud->Enabled = f;
BitLen->Enabled = f;
Stop->Enabled = f;
Parity->Enabled = f;
GB3->Enabled = f;
flwXON->Enabled = f;
flwCTS->Enabled = f && !CBPTT->Checked;
CBPTT->Enabled = f;
Label3->Enabled = f;
ByteWait->Enabled = f;
Label8->Enabled = f;
f = TRUE;
LVFO->Visible = f;
VFOType->Visible = f;
LInt->Visible = f;
LInts->Visible = f;
PollInt->Visible = f;
LVFO->Enabled = f;
VFOType->Enabled = f;
if( !f ){
LInt->Enabled = f;
LInts->Enabled = f;
PollInt->Enabled = f;
}
}
//---------------------------------------------------------------------
int __fastcall TRADIOSetDlg::Execute(void)
{
PortName->Text = RADIO.StrPort;
Baud->Text = RADIO.BaudRate;
BitLen->ItemIndex = RADIO.BitLen;
Parity->ItemIndex = RADIO.Parity;
Stop->ItemIndex = RADIO.Stop;
flwXON->Checked = RADIO.flwXON;
flwCTS->Checked = RADIO.flwCTS;
CBPTT->Checked = RADIO.usePTT;
ByteWait->Text = int(RADIO.ByteWait);
char bf[32];
sprintf( bf, "%02X", RADIO.Cmdxx);
Cmdxx->Text = bf;
CmdInit->Text = RADIO.CmdInit;
CmdRx->Text = RADIO.CmdRx;
CmdTx->Text = RADIO.CmdTx;
CmdGNR->Text = RADIO.cmdGNR;
OpenGNR->Checked = RADIO.openGNR;
m_PollType = RADIO.PollType;
RGFS->ItemIndex = RADIO.PollOffset;
PollInt->Text = (RADIO.PollInterval + 2)/10.0;
AddrScan->Checked = RADIO.PollScan;
SetMaker();
UpdateUI();
m_fnHintProc = Application->OnHint;
Application->OnHint = DisplayHint;
int r = ShowModal();
Application->OnHint = m_fnHintProc;
if( r == IDOK ){
StrCopy(RADIO.StrPort, AnsiString(PortName->Text).c_str(), 31); //JA7UDE 0428
int dd;
if( sscanf(AnsiString(Baud->Text).c_str(), "%u", &dd) == 1 ){ //JA7UDE 0428
RADIO.BaudRate = dd;
}
RADIO.BitLen = BitLen->ItemIndex;
RADIO.Parity = Parity->ItemIndex;
RADIO.Stop = Stop->ItemIndex;
RADIO.flwXON = flwXON->Checked;
RADIO.flwCTS = flwCTS->Checked;
RADIO.usePTT = CBPTT->Checked;
if( sscanf(AnsiString(ByteWait->Text).c_str(), "%u", &dd) == 1 ){ //JA7UDE 0428
if( (dd >= 0) && (dd <= 1000) ){
RADIO.ByteWait = dd;
}
}
if( sscanf(AnsiString(Cmdxx->Text).c_str(), "%X", &dd) == 1 ){ //JA7UDE 0428
RADIO.Cmdxx = dd & 0x000000ff;
}
RADIO.CmdInit = CmdInit->Text;
RADIO.CmdRx = CmdRx->Text;
RADIO.CmdTx = CmdTx->Text;
RADIO.cmdGNR = CmdGNR->Text;
RADIO.openGNR = OpenGNR->Checked;
RADIO.PollType = m_PollType;
RADIO.PollOffset = RGFS->ItemIndex;
double d;
if( sscanf(AnsiString(PollInt->Text).c_str(), "%lf", &d) == 1 ){ //JA7UDE 0428
if( d < 0.2 ) d = 0.2;
RADIO.PollInterval = int((d * 10.0) - 2);
if( RADIO.PollInterval < 0 ) RADIO.PollInterval = 0;
}
RADIO.PollScan = AddrScan->Checked;
RADIO.change = 1;
return TRUE;
}
else {
return FALSE;
}
}
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::LoadBtnClick(TObject *Sender)
{
//
TOpenDialog *pBox = new TOpenDialog(this);
pBox->Options >> ofCreatePrompt;
pBox->Options << ofFileMustExist;
if( sys.m_MsgEng ){
pBox->Title = "Open command file";
pBox->Filter = "Command files(*.rcm)|*.rcm|";
}
else {
pBox->Title = "コマンド定義ファイルを開く";
pBox->Filter = "コマンド定義ファイル(*.rcm)|*.rcm|";
}
pBox->FileName = "";
pBox->DefaultExt = "rcm";
pBox->InitialDir = sys.m_BgnDir;
if( pBox->Execute() == TRUE ){
CWaitCursor w;
TMemIniFile *pIniFile = new TMemIniFile(pBox->FileName);
CmdInit->Text = pIniFile->ReadString("RADIO", "CmdInit", CmdInit->Text);
CmdRx->Text = pIniFile->ReadString("RADIO", "CmdRx", CmdRx->Text);
CmdTx->Text = pIniFile->ReadString("RADIO", "CmdTx", CmdTx->Text);
Cmdxx->Text = pIniFile->ReadString("RADIO", "Cmdxx", Cmdxx->Text);
m_PollType = pIniFile->ReadInteger("RADIO", "PollType", 0);
RGFS->ItemIndex = pIniFile->ReadInteger("RADIO", "Offset", 0);
PollInt->Text = (pIniFile->ReadInteger("RADIO", "PollInterval", 0) + 2)/10.0;
AddrScan->Checked = 0;
delete pIniFile;
SetMaker();
UpdateUI();
}
delete pBox;
}
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::SaveBtnClick(TObject *Sender)
{
TSaveDialog *pBox = new TSaveDialog(this);
if( sys.m_MsgEng ){
pBox->Title = "Save command file";
pBox->Filter = "Command files(*.rcm)|*.rcm|";
}
else {
pBox->Title = "コマンド定義ファイルの作成";
pBox->Filter = "コマンド定義ファイル(*.rcm)|*.rcm|";
}
pBox->FileName = "MyRIG.rcm";
pBox->DefaultExt = "rcm";
pBox->InitialDir = sys.m_BgnDir;
if( pBox->Execute() == TRUE ){
CWaitCursor w;
TMemIniFile *pIniFile = new TMemIniFile(pBox->FileName);
pIniFile->WriteString("RADIO", "CmdInit", CmdInit->Text);
pIniFile->WriteString("RADIO", "CmdRx", CmdRx->Text);
pIniFile->WriteString("RADIO", "CmdTx", CmdTx->Text);
pIniFile->WriteString("RADIO", "Cmdxx", Cmdxx->Text);
pIniFile->WriteInteger("RADIO", "PollType", m_PollType);
pIniFile->ReadInteger("RADIO", "Offset", RGFS->ItemIndex);
double d;
int dd = 5;
if( sscanf(AnsiString(PollInt->Text).c_str(), "%lf", &d) == 1 ){ //JA7UDE 0428
if( d >= 0.2 ){
dd = int((d * 10.0) - 2);
if( dd < 0 ) dd = 0;
}
}
pIniFile->WriteInteger("RADIO", "PollInterval", dd);
pIniFile->UpdateFile();
delete pIniFile;
}
delete pBox;
}
//---------------------------------------------------------------------------
int __fastcall TRADIOSetDlg::IsXX(void)
{
if( strstr(AnsiString(Maker->Text).c_str(), "xx") != NULL ) return 1; //JA7UDE 0428
if( m_PollType == RADIO_POLLICOM ) return 1;
if( m_PollType == RADIO_POLLICOMN ) return 1;
if( m_PollType == RADIO_POLLOMNIVI ) return 1;
if( m_PollType == RADIO_POLLOMNIVIN ) return 1;
return 0;
}
//---------------------------------------------------------------------------
int __fastcall TRADIOSetDlg::IsCompatible(int PollType, int MakerIndex)
{
if (MakerIndex == 5) { //MakerIndex 5 is Kenwood
if (PollType == 0){
return 1;
}
else if (PollType == RADIO_POLLKENWOOD) {
return 1;
}
else if (PollType == RADIO_POLLKENWOODN) {
return 1;
}
else {
return 0;
}
}
else if (MakerIndex == 1) { //MakerIndex 1 is Yaesu FT-9000 et al
if (PollType == 0){
return 1;
}
else if (PollType == RADIO_POLLFT9000) {
return 1;
}
else if (PollType == RADIO_POLLFT2000) {
return 1;
}
else if (PollType == RADIO_POLLFT950) {
return 1;
}
else if (PollType == RADIO_POLLFT450) {
return 1;
}
else {
return 0;
}
}
else {
return 1;
}
}
//---------------------------------------------------------------------------
int __fastcall TRADIOSetDlg::IsSame(LPCSTR t, LPCSTR v)
{
for( ; *v && *t; v++, t++ ){
if( (*v=='x')&&(*(v+1)=='x') ){
t++;
v++;
}
else if( (*t == '\\')&&(*(t+1) == 'w') ){
return 1;
}
else if( (*v == '\\')&&(*(v+1) == 'w') ){
return 1;
}
else if( *t != *v ){
return 0;
}
}
return *t != *v ? 0 : 1;
}
//---------------------------------------------------------------------------
int __fastcall TRADIOSetDlg::GetVFOType(LPCSTR pKey)
{
for( int i = 0; __VL[i] != NULL; i++ ){
const POLLDEF *p = __VL[i];
for( ; p->pKey != NULL; p++ ){
if( !strcmp(p->pKey, pKey) ) return p->r;
}
}
return 0;
}
//---------------------------------------------------------------------------
LPCSTR __fastcall TRADIOSetDlg::GetVFOName(int r)
{
for( int i = 0; __VL[i] != NULL; i++ ){
const POLLDEF *p = __VL[i];
for( ; p->pKey != NULL; p++ ){
if( p->r == r ) return p->pKey;
}
}
return "NONE";
}
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::SetVFOList(void)
{
m_DisEvent++;
const POLLDEF *p = __VL[m_Maker];
VFOType->Items->Clear();
for( ; p->pKey != NULL; p++ ){
VFOType->Items->Add(p->pKey);
}
VFOType->Text = GetVFOName(m_PollType);
m_DisEvent--;
}
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::SetMaker(void)
{
int i;
for( i = 0; __MK[i] != NULL; i++ ){
if( IsSame(AnsiString(CmdRx->Text).c_str(), __MT[i][1]) && IsSame(AnsiString(CmdTx->Text).c_str(), __MT[i][2]) && IsCompatible (m_PollType,i)){ //AA6YQ 1.66 JA7UDE 0428
m_DisEvent++;
Maker->Text = __MK[i];
m_DisEvent--;
m_Maker = i;
SetVFOList();
return;
}
}
m_Maker = MAKER_UNKNOWN;
m_DisEvent++;
Maker->Text = "Unknown";
SetVFOList();
m_DisEvent--;
}
void __fastcall TRADIOSetDlg::MakerChange(TObject *Sender)
{
if( m_DisEvent ) return;
m_PollType = 0;
VFOType->Text = "NONE";
PollInt->Text = "1";
AddrScan->Checked = 0;
for( int i = 0; __MK[i] != NULL; i++ ){
if( Maker->Text == __MK[i] ){
CmdInit->Text = __MT[i][0];
CmdRx->Text = __MT[i][1];
CmdTx->Text = __MT[i][2];
m_Maker = i;
if( m_Maker == 3 ){ // Ten-Tec Omni-VI
Cmdxx->Text = "04";
}
SetVFOList();
break;
}
}
UpdateUI();
}
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::PortNameChange(TObject *Sender)
{
if( m_DisEvent ) return;
UpdateUI();
}
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::RefBtnClick(TObject *Sender)
{
TOpenDialog *pBox = new TOpenDialog(this);
pBox->Options >> ofCreatePrompt;
pBox->Options << ofFileMustExist;
if( sys.m_MsgEng ){
pBox->Title = "Program file";
pBox->Filter = "Program files(*.exe;*.lnk)|*.exe;*.lnk|";
}
else {
pBox->Title = "プログラムファイル";
pBox->Filter = "プログラムファイル(*.exe;*.lnk)|*.exe;*.lnk|";
}
pBox->FileName = CmdGNR->Text.c_str();
pBox->DefaultExt = "exe";
char bf[256];
SetDirName(bf, AnsiString(CmdGNR->Text).c_str()); //JA7UDE 0428
pBox->InitialDir = bf;
if( pBox->Execute() == TRUE ){
CmdGNR->Text = AnsiString(pBox->FileName).c_str(); //JA7UDE 0428
}
delete pBox;
}
//---------------------------------------------------------------------------
void __fastcall TRADIOSetDlg::VFOTypeChange(TObject *Sender)
{
if( m_DisEvent ) return;
m_PollType = GetVFOType(AnsiString(VFOType->Text).c_str()); //JA7UDE 0428
UpdateUI();
}
//---------------------------------------------------------------------------