Add files via upload

- limit PTT/FSK port selector and Radio port selector to display only 8 items
- add COM33-64 to PTT/FSK port selector and Radio port selector
- add 891 to Yaesu Group selector entry
- add 991 and 891 to Model selector for Yaesu Group
- provide "Hide FlexRadio Reserved and IQ Audio Devices" checkbox on the Options panel's Soundcard tab
- notify user if attempting to open FSK TxD port at low speed fails, as many serial port devices can't do this
- accept RXM_SOUNDSOURCE message to change soundcard source channel (mono, left, right)
This commit is contained in:
Dave 2016-12-11 03:22:40 -05:00 committed by GitHub
parent 757048b871
commit 60a60ddb4e
12 changed files with 302 additions and 68 deletions

View file

@ -30,11 +30,19 @@
#include <math.h> #include <math.h>
#include <mbstring.h> #include <mbstring.h>
#include <SHELLAPI.H> #include <SHELLAPI.H>
//AA6YQ 1.65D->1.66G, JE3HHT 1.67
#define VERID "Ver1.70" //K6TU 1.68A -> 1.70A AA6YQ 1.65D->1.66G, JE3HHT 1.67 #define VERID "Ver1.70" //K6TU 1.68A -> 1.70A Hide FlexRadio Reserved and IQ Audio Devices
#define VERBETA "D" //JA7UDE 1.70A -> 1.70B G3WYW FT-991 CAT support #define VERBETA "G" //JA7UDE 1.70A -> 1.70B G3WYW FT-991 CAT support
//AA6YQ 1.70C added COM16-32 to PTT/FSK port selector and Radio port selector, added 991 to Yaesu Maker selector entry //AA6YQ 1.70C added COM16-32 to PTT/FSK port selector and Radio port selector, added 991 to Yaesu Group selector entry
//AA6YQ 1.70D prevent shift > 4000 Hz so CSlideFFT::Create does not divide by zero //AA6YQ 1.70D prevent shift > 4000 Hz so CSlideFFT::Create does not divide by zero
//AA6YQ 1.70E limit PTT/FSK port selector and Radio port selector to display only 8 items
// added COM33-64 to PTT/FSK port selector and Radio port selector
// added 891 to Yaesu Group selector entry
// added 991 and 891 to Model selector for Yaesu Group
// provide "Hide FlexRadio Reserved and IQ Audio Devices" checkbox on the Options panel's Soundcard tab.
//AA6YQ 1.70F notify user if attempting to open FSK TxD port at low speed, as many serial port devices can't do this
// accept RXM_SOUNDSOURCE message to change soundcard source channel (mono, left, right)
//JA7UDE 1.70G translate new 1.70F error message into Japanese
#define VERTTL2 "MMTTY "VERID VERBETA #define VERTTL2 "MMTTY "VERID VERBETA
#define VERTTL VERTTL2" (C) JE3HHT 2000-2010." #define VERTTL VERTTL2" (C) JE3HHT 2000-2010."
@ -218,7 +226,8 @@ typedef struct {
int m_SoundPriority; int m_SoundPriority;
int m_SoundDevice; int m_SoundDevice;
int m_SoundOutDevice; //AA6YQ 1.66 int m_SoundOutDevice; //AA6YQ 1.66
int m_HideFlexAudio; //AA6YQ 1.70E
int m_SoundStereo; int m_SoundStereo;
int m_SoundFifoRX; int m_SoundFifoRX;
int m_SoundFifoTX; int m_SoundFifoTX;

View file

@ -458,6 +458,8 @@ __fastcall TMmttyWd::TMmttyWd(TComponent* Owner)
sys.m_SoundPriority = 1; sys.m_SoundPriority = 1;
sys.m_SoundStereo = 0; sys.m_SoundStereo = 0;
sys.m_HideFlexAudio=0; //AA6YQ 1.70E
sys.m_txuos = 1; sys.m_txuos = 1;
sys.m_dblsft = 0; sys.m_dblsft = 0;
@ -1586,7 +1588,12 @@ void __fastcall TMmttyWd::OpenClosePTT(void)
delete pComm; delete pComm;
pComm = NULL; pComm = NULL;
if( !Remote || !m_RemoteTimer ){ if( !Remote || !m_RemoteTimer ){
ErrorMB( (Font->Charset != SHIFTJIS_CHARSET)? "Cannot open '%s'":"'%s'がオープンできません.", sys.m_TxRxName.c_str()); if (cm.Baud<110){ //1.70F notify user if attempting to open port at low speed, as many devices can't do this
ErrorMB( (Font->Charset != SHIFTJIS_CHARSET)? "Cannot open '%s' at '%s' baud; if the selected serial port can't handle this baud rate, use EXTFSK.":"'%s'をボーレート'%s'で開けません.もし、選択したシリアルポートがこのボーレートをサポートしていないときはEXTFSKを使ってください。", sys.m_TxRxName.c_str(),AnsiString(cm.Baud).c_str());
}
else {
ErrorMB( (Font->Charset != SHIFTJIS_CHARSET)? "Cannot open '%s'":"'%s'がオープンできません.", sys.m_TxRxName.c_str());
}
} }
} }
_noerr:; _noerr:;
@ -2031,10 +2038,13 @@ void __fastcall TMmttyWd::ReadRegister(void)
if( sys.m_SoundFifoTX > WAVE_FIFO_MAX ) sys.m_SoundFifoTX = WAVE_FIFO_MAX; if( sys.m_SoundFifoTX > WAVE_FIFO_MAX ) sys.m_SoundFifoTX = WAVE_FIFO_MAX;
sys.m_SoundPriority = pIniFile->ReadInteger("Define", "SoundPriority", sys.m_SoundPriority); sys.m_SoundPriority = pIniFile->ReadInteger("Define", "SoundPriority", sys.m_SoundPriority);
sys.m_SoundDevice = pIniFile->ReadInteger("Define", "SoundDevice", sys.m_SoundDevice); sys.m_SoundDevice = pIniFile->ReadInteger("Define", "SoundDevice", sys.m_SoundDevice);
sys.m_SoundOutDevice = pIniFile->ReadInteger("Define", "SoundOutDevice", sys.m_SoundDevice); //AA6YQ 1.66 sys.m_SoundOutDevice = pIniFile->ReadInteger("Define", "SoundOutDevice", sys.m_SoundDevice); //AA6YQ 1.66
sys.m_HideFlexAudio = pIniFile->ReadInteger("Define", "HideFlexAudio", sys.m_HideFlexAudio); //AA6YQ 1.70E
sys.m_SoundMMW = pIniFile->ReadString("Define", "SoundMMW", sys.m_SoundMMW); sys.m_SoundMMW = pIniFile->ReadString("Define", "SoundMMW", sys.m_SoundMMW);
pSound->m_IDDevice = sys.m_SoundDevice; pSound->m_IDDevice = sys.m_SoundDevice;
pSound->m_IDOutDevice=sys.m_SoundOutDevice; pSound->m_IDOutDevice=sys.m_SoundOutDevice;
sys.m_SoundStereo = pIniFile->ReadInteger("Define", "SoundStereo", sys.m_SoundStereo); sys.m_SoundStereo = pIniFile->ReadInteger("Define", "SoundStereo", sys.m_SoundStereo);
pSound->InitWFX(); pSound->InitWFX();
pSound->FSKDEM.SetFilterTap(pIniFile->ReadInteger("Define", "Tap", pSound->FSKDEM.GetFilterTap())); pSound->FSKDEM.SetFilterTap(pIniFile->ReadInteger("Define", "Tap", pSound->FSKDEM.GetFilterTap()));
@ -2370,10 +2380,12 @@ void __fastcall TMmttyWd::WriteRegister(void)
pIniFile->WriteInteger("Define", "SoundTxFifo", sys.m_SoundFifoTX ); pIniFile->WriteInteger("Define", "SoundTxFifo", sys.m_SoundFifoTX );
pIniFile->WriteInteger("Define", "SoundPriority", sys.m_SoundPriority); pIniFile->WriteInteger("Define", "SoundPriority", sys.m_SoundPriority);
pIniFile->WriteInteger("Define", "SoundDevice", sys.m_SoundDevice); pIniFile->WriteInteger("Define", "SoundDevice", sys.m_SoundDevice);
pIniFile->WriteInteger("Define", "SoundOutDevice", sys.m_SoundOutDevice); //AA6YQ 1.66 pIniFile->WriteInteger("Define", "SoundOutDevice", sys.m_SoundOutDevice); //AA6YQ 1.66
pIniFile->WriteInteger("Define", "SoundStereo", sys.m_SoundStereo); pIniFile->WriteInteger("Define", "SoundStereo", sys.m_SoundStereo);
pIniFile->WriteString("Define", "SoundMMW", sys.m_SoundMMW); pIniFile->WriteString("Define", "SoundMMW", sys.m_SoundMMW);
pIniFile->WriteInteger("Define", "HideFlexAudio", sys.m_HideFlexAudio); //AA6YQ 1.70E
pIniFile->WriteInteger("Define", "Tap", pSound->FSKDEM.GetFilterTap()); pIniFile->WriteInteger("Define", "Tap", pSound->FSKDEM.GetFilterTap());
pIniFile->WriteInteger("Define", "IIRBW", pSound->FSKDEM.m_iirfw); pIniFile->WriteInteger("Define", "IIRBW", pSound->FSKDEM.m_iirfw);
@ -8665,7 +8677,13 @@ void __fastcall TMmttyWd::RemoteMMTTY(tagMSG &Msg)
COMM.change = 1; COMM.change = 1;
OpenCloseCom(); OpenCloseCom();
} }
break; break;
case RXM_SOUNDSOURCE: // Added by AA6YQ 1.70F
if( sys.m_SoundStereo != (Msg.lParam & 0x03) ){
sys.m_SoundStereo = Msg.lParam & 0x03;
pSound->InitSound();
}
break;
default: default:
break; break;
} }

5
Main.h
View file

@ -81,7 +81,8 @@ enum {
RXM_SETLENGTH, RXM_SETLENGTH,
RXM_ENBSHARED, RXM_ENBSHARED,
RXM_PTTFSK, // 30 Added by JE3HHT on Sep.2010 RXM_PTTFSK, // 30 Added by JE3HHT on Sep.2010
RXM_SOUNDSOURCE,// 31 Added by AA6YQ in 1.70F
//-------------------------------------- //--------------------------------------
TXM_HANDLE=0x8000, // MMTTY -> APP TXM_HANDLE=0x8000, // MMTTY -> APP
TXM_REQHANDLE, TXM_REQHANDLE,
@ -647,6 +648,8 @@ __published: // IDE
void __fastcall KMOptClick(TObject *Sender); void __fastcall KMOptClick(TObject *Sender);
void __fastcall KViewClick(TObject *Sender); void __fastcall KViewClick(TObject *Sender);
void __fastcall KExtCmdClick(TObject *Sender); void __fastcall KExtCmdClick(TObject *Sender);
private: // ユーザー宣言 private: // ユーザー宣言
WAVEFORMAT wfm; WAVEFORMAT wfm;

View file

@ -37,7 +37,7 @@ static int PageIndexBPF = 0;
// Static array to map selected audio devices from radio group index // Static array to map selected audio devices from radio group index
// to unit number - one each for input & output devices // to unit number - one each for input & output devices
// K6TU 3/17/2015 // K6TU 1.70A 3/17/2015
static int InputDeviceMap[16]; static int InputDeviceMap[16];
static int OutputDeviceMap[16]; static int OutputDeviceMap[16];
//--------------------------------------------------------------------- //---------------------------------------------------------------------
@ -64,7 +64,7 @@ __fastcall TOptionDlg::TOptionDlg(TComponent* AOwner)
SetComboBox(pllVCOGain, MmttyWd->m_asVCOGain.c_str()); SetComboBox(pllVCOGain, MmttyWd->m_asVCOGain.c_str());
SetComboBox(pllLoopFC, MmttyWd->m_asLoopFC.c_str()); SetComboBox(pllLoopFC, MmttyWd->m_asLoopFC.c_str());
//K6TU //K6TU 1.70A
// Amended enumeration of audio units to review the // Amended enumeration of audio units to review the
// first 32 units for each of input & output. // first 32 units for each of input & output.
// //
@ -85,10 +85,12 @@ __fastcall TOptionDlg::TOptionDlg(TComponent* AOwner)
devName = MmttyWd->pSound->GetInputSoundcard(CurrentUnit); devName = MmttyWd->pSound->GetInputSoundcard(CurrentUnit);
cString = AnsiString(devName).c_str(); cString = AnsiString(devName).c_str();
if (strstr(cString, "IQ") || strstr(cString, "RESERVED")) { if (sys.m_HideFlexAudio) { //AA6YQ 1.70E
// This is one of the FlexRadio audio devices we don't want if (strstr(cString, "IQ") || strstr(cString, "RESERVED")) {
CurrentUnit++; // This is one of the FlexRadio audio devices we don't want
continue; CurrentUnit++;
continue;
}
} }
// This is a device we want... // This is a device we want...
@ -113,10 +115,12 @@ __fastcall TOptionDlg::TOptionDlg(TComponent* AOwner)
devName = MmttyWd->pSound->GetOutputSoundcard(CurrentUnit); devName = MmttyWd->pSound->GetOutputSoundcard(CurrentUnit);
cString = AnsiString(devName).c_str(); cString = AnsiString(devName).c_str();
if (strstr(cString, "IQ") || strstr(cString, "RESERVED")) { if (sys.m_HideFlexAudio) { //AA6YQ 1.70E
// This is one of the FlexRadio audio devices we don't want if (strstr(cString, "IQ") || strstr(cString, "RESERVED")) {
CurrentUnit++; // This is one of the FlexRadio audio devices we don't want
continue; CurrentUnit++;
continue;
}
} }
// This is a device we want... // This is a device we want...
@ -514,9 +518,11 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp)
FifoTX->Text = sys.m_SoundFifoTX; FifoTX->Text = sys.m_SoundFifoTX;
SoundPriority->ItemIndex = sys.m_SoundPriority; SoundPriority->ItemIndex = sys.m_SoundPriority;
HideFlexAudio->Checked = sys.m_HideFlexAudio; //AA6YQ 1.70E
if( sys.m_SoundDevice == -2 ){ if( sys.m_SoundDevice == -2 ){
DevNo->Text = sys.m_SoundMMW; DevNo->Text = sys.m_SoundMMW;
} }
else { else {
DevNo->Text = sys.m_SoundDevice; DevNo->Text = sys.m_SoundDevice;
} }
@ -525,13 +531,14 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp)
if( sys.m_SoundOutDevice == -2 ){ if( sys.m_SoundOutDevice == -2 ){
DevOutNo->Text = sys.m_SoundMMW; DevOutNo->Text = sys.m_SoundMMW;
} }
else { else {
DevOutNo->Text = sys.m_SoundOutDevice; DevOutNo->Text = sys.m_SoundOutDevice;
} }
//AA6YQ 1.66 //AA6YQ 1.66
//K6TU //K6TU 1.70A
if (IsSoundcard (AnsiString(DevNo->Text).c_str())) { //JA7UDE 0428 if (IsSoundcard (AnsiString(DevNo->Text).c_str())) { //JA7UDE 0428
// Assuming that devices haven't been re-enumerated by Windows, // Assuming that devices haven't been re-enumerated by Windows,
// we need to find the corresponding unit number in the map in order // we need to find the corresponding unit number in the map in order
// to select the right unit // to select the right unit
@ -542,6 +549,7 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp)
break; break;
} }
} }
InputSoundcards->ItemIndex = i != 16 ? i : -1; InputSoundcards->ItemIndex = i != 16 ? i : -1;
// InputSoundcards->ItemIndex = atoi(AnsiString(DevNo->Text).c_str()); //AA6YQ 1.66 //JA7UDE 0428 // InputSoundcards->ItemIndex = atoi(AnsiString(DevNo->Text).c_str()); //AA6YQ 1.66 //JA7UDE 0428
} }
@ -550,8 +558,9 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp)
} }
//AA6YQ 1.66 //AA6YQ 1.66
//K6TU //K6TU 1.70A
if (IsSoundcard (AnsiString(DevOutNo->Text).c_str())) { //JA7UDE 0428 if (IsSoundcard (AnsiString(DevOutNo->Text).c_str())) { //JA7UDE 0428
// Assuming that devices haven't been re-enumerated by Windows, // Assuming that devices haven't been re-enumerated by Windows,
// we need to find the corresponding unit number in the map in order // we need to find the corresponding unit number in the map in order
// to select the right unit // to select the right unit
@ -562,8 +571,10 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp)
break; break;
} }
} }
OutputSoundcards->ItemIndex = i != 16 ? i : -1; OutputSoundcards->ItemIndex = i != 16 ? i : -1;
// OutputSoundcards->ItemIndex = atoi(AnsiString(DevOutNo->Text).c_str()); //AA6YQ 1.66 //JA7UDE 0428 // OutputSoundcards->ItemIndex = atoi(AnsiString(DevOutNo->Text).c_str()); //AA6YQ 1.66 //JA7UDE 0428
} }
else { else {
OutputSoundcards->ItemIndex =-1; OutputSoundcards->ItemIndex =-1;
@ -820,8 +831,10 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp)
sys.m_SoundPriority = SoundPriority->ItemIndex; sys.m_SoundPriority = SoundPriority->ItemIndex;
sys.m_HideFlexAudio=HideFlexAudio->Checked; //AA6YQ 1.70E
if( sscanf(AnsiString(DevNo->Text).c_str(), "%d", &dd) == 1 ){ //JA7UDE 0428 if( sscanf(AnsiString(DevNo->Text).c_str(), "%d", &dd) == 1 ){ //JA7UDE 0428
// Find the unit number in the input map and update //K6TU 1.70A Find the unit number in the input map and update
sys.m_SoundDevice = InputDeviceMap[dd]; sys.m_SoundDevice = InputDeviceMap[dd];
// sys.m_SoundDevice = dd; // sys.m_SoundDevice = dd;
} }
@ -832,7 +845,7 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp)
//AA6YQ 1.66 //AA6YQ 1.66
if( sscanf(AnsiString(DevOutNo->Text).c_str(), "%d", &dd) == 1 ){ //JA7UDE 0428 if( sscanf(AnsiString(DevOutNo->Text).c_str(), "%d", &dd) == 1 ){ //JA7UDE 0428
// Find the unit in the output map and update //K6TU 1.70A Find the unit in the output map and update
sys.m_SoundOutDevice = OutputDeviceMap[dd]; sys.m_SoundOutDevice = OutputDeviceMap[dd];
// sys.m_SoundOutDevice = dd; // sys.m_SoundOutDevice = dd;
} }
@ -1560,7 +1573,9 @@ void __fastcall TOptionDlg::PortNameDropDown(TObject *Sender)
for( int i = 0; i < m_MMList.GetCount(); i++ ){ for( int i = 0; i < m_MMList.GetCount(); i++ ){
PortName->Items->Add(m_MMList.GetItemName(i)); PortName->Items->Add(m_MMList.GetItemName(i));
} }
PortName->DropDownCount = PortName->Items->Count; //AA6YQ 1.70E
//PortName->DropDownCount = PortName->Items->Count;
PortName->DropDownCount = 8;
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -1620,8 +1635,8 @@ void __fastcall TOptionDlg::DevOutNoDropDown(TObject *Sender)
void __fastcall TOptionDlg::InputSoundcardsClick(TObject *Sender) void __fastcall TOptionDlg::InputSoundcardsClick(TObject *Sender)
{ {
//AA6YQ 1.66 //AA6YQ 1.66
DevNo->ItemIndex = InputSoundcards->ItemIndex+1; DevNo->ItemIndex = InputSoundcards->ItemIndex+1;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -1632,7 +1647,7 @@ void __fastcall TOptionDlg::DevNoClick(TObject *Sender)
InputSoundcards->ItemIndex = atoi(AnsiString(DevNo->Text).c_str()); //AA6YQ 1.66 //JA7UDE 0428 InputSoundcards->ItemIndex = atoi(AnsiString(DevNo->Text).c_str()); //AA6YQ 1.66 //JA7UDE 0428
} }
else { else {
InputSoundcards->ItemIndex =-1; InputSoundcards->ItemIndex =-1;
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -1653,7 +1668,7 @@ void __fastcall TOptionDlg::DevOutNoClick(TObject *Sender)
OutputSoundcards->ItemIndex = atoi(AnsiString(DevOutNo->Text).c_str()); //AA6YQ 1.66 //JA7UDE 0428 OutputSoundcards->ItemIndex = atoi(AnsiString(DevOutNo->Text).c_str()); //AA6YQ 1.66 //JA7UDE 0428
} }
else { else {
OutputSoundcards->ItemIndex =-1; OutputSoundcards->ItemIndex =-1;
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -1670,3 +1685,155 @@ void __fastcall TOptionDlg::SBAA6YQClick(TObject *Sender)
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TOptionDlg::HideFlexAudioClick(TObject *Sender)
{
int CountUnits = 0;
int CurrentUnit = 0;
int unitnum;
int i;
int NewDeviceNumber;
int InputDeviceNumber;
int MappedInputDeviceNumber;
int OutputDeviceNumber;
int MappedOutputDeviceNumber;
LPCSTR devName;
char *cString;
InputDeviceNumber = atoi(AnsiString(DevNo->Text).c_str());
if (InputDeviceNumber < 16) {
MappedInputDeviceNumber = InputDeviceMap[InputDeviceNumber];
} else {
MappedInputDeviceNumber=-1;
}
OutputDeviceNumber = atoi(AnsiString(DevOutNo->Text).c_str());
if (OutputDeviceNumber < 16) {
MappedOutputDeviceNumber = OutputDeviceMap[OutputDeviceNumber];
} else {
MappedOutputDeviceNumber=-1;
}
InputSoundcards->Items->BeginUpdate();
InputSoundcards->Items->Clear();
while (CountUnits < 16 && CurrentUnit < 32) {
devName = MmttyWd->pSound->GetInputSoundcard(CurrentUnit);
cString = AnsiString(devName).c_str();
if (HideFlexAudio->Checked) { //AA6YQ 1.70E
if (strstr(cString, "IQ") || strstr(cString, "RESERVED")) {
// This is one of the FlexRadio audio devices we don't want
CurrentUnit++;
continue;
}
}
// This is a device we want...
if (devName) {
InputSoundcards->Items->Add(devName);
InputDeviceMap[CountUnits++] = CurrentUnit++;
} else {
CurrentUnit++;
}
}
// for( int i = 0; i < 16; i++ ){
// InputSoundcards->Items->Add(MmttyWd->pSound->GetInputSoundcard(i));
// }
InputSoundcards->Items->EndUpdate();
if (HideFlexAudio->Checked != sys.m_HideFlexAudio) {
NewDeviceNumber=-1;
if (IsSoundcard (AnsiString(DevNo->Text).c_str())) {
if (HideFlexAudio->Checked) {
for (i=0; i < 16; i++) {
if (InputDeviceMap[i] == InputDeviceNumber) {
break;
}
}
NewDeviceNumber = i != 16 ? i : -1;
} else {
NewDeviceNumber = MappedInputDeviceNumber;
}
}
InputSoundcards->ItemIndex = NewDeviceNumber;
DevNo->ItemIndex = NewDeviceNumber+1;
sys.m_SoundDevice = NewDeviceNumber;
}
OutputSoundcards->Items->BeginUpdate();
OutputSoundcards->Items->Clear();
CountUnits = 0;
CurrentUnit = 0;
while (CountUnits < 16 && CurrentUnit < 32) {
devName = MmttyWd->pSound->GetOutputSoundcard(CurrentUnit);
cString = AnsiString(devName).c_str();
if (HideFlexAudio->Checked) { //AA6YQ 1.70E
if (strstr(cString, "IQ") || strstr(cString, "RESERVED")) {
// This is one of the FlexRadio audio devices we don't want
CurrentUnit++;
continue;
}
}
// This is a device we want...
if (devName) {
OutputSoundcards->Items->Add(devName);
OutputDeviceMap[CountUnits++] = CurrentUnit++;
} else {
CurrentUnit++;
}
}
//for( int i = 0; i < 16; i++ ){
// OutputSoundcards->Items->Add(MmttyWd->pSound->GetOutputSoundcard(i));
//}
OutputSoundcards->Items->EndUpdate();
if (HideFlexAudio->Checked != sys.m_HideFlexAudio) {
NewDeviceNumber=-1;
if (IsSoundcard (AnsiString(DevOutNo->Text).c_str())) {
if (HideFlexAudio->Checked) {
for (i=0; i < 16; i++) {
if (OutputDeviceMap[i] == OutputDeviceNumber) {
break;
}
}
NewDeviceNumber = i != 16 ? i : -1;
} else {
NewDeviceNumber = MappedOutputDeviceNumber;
}
}
OutputSoundcards->ItemIndex = NewDeviceNumber;
DevOutNo->ItemIndex = NewDeviceNumber+1;
sys.m_SoundOutDevice = NewDeviceNumber;
}
sys.m_HideFlexAudio = HideFlexAudio->Checked;
}
//---------------------------------------------------------------------------

Binary file not shown.

View file

@ -270,7 +270,7 @@ __published:
TLabel *Label2; TLabel *Label2;
TLabel *Label3; TLabel *Label3;
TTabSheet *TabSound; TTabSheet *TabSound;
TRadioGroup *InputSoundcards; TRadioGroup *InputSoundcards;
TRadioGroup *OutputSoundcards; TRadioGroup *OutputSoundcards;
TComboBox *Tones; TComboBox *Tones;
TGroupBox *GB20; TGroupBox *GB20;
@ -279,6 +279,7 @@ __published:
TCheckBox *CBFix45; TCheckBox *CBFix45;
TCheckBox *CBAA6YQ; TCheckBox *CBAA6YQ;
TSpeedButton *SBAA6YQ; TSpeedButton *SBAA6YQ;
TCheckBox *HideFlexAudio;
void __fastcall HamBtnClick(TObject *Sender); void __fastcall HamBtnClick(TObject *Sender);
@ -345,12 +346,15 @@ __published:
void __fastcall DevOutNoDropDown(TObject *Sender); void __fastcall DevOutNoDropDown(TObject *Sender);
void __fastcall InputSoundcardsClick(TObject *Sender); void __fastcall InputSoundcardsClick(TObject *Sender);
void __fastcall OutputSoundcardsClick(TObject *Sender); void __fastcall OutputSoundcardsClick(TObject *Sender);
void __fastcall DevNoClick(TObject *Sender); void __fastcall DevNoClick(TObject *Sender);
void __fastcall DevOutNoClick(TObject *Sender); void __fastcall DevOutNoClick(TObject *Sender);
void __fastcall SBAA6YQClick(TObject *Sender); void __fastcall SBAA6YQClick(TObject *Sender);
void __fastcall HideFlexAudioClick(TObject *Sender);
private: private:
int m_FontCharset; int m_FontCharset;
int m_FontStyle; int m_FontStyle;

BIN
Scope.dfm

Binary file not shown.

View file

@ -47,7 +47,7 @@ __fastcall TVerDspDlg::TVerDspDlg(TComponent* AOwner)
LTNX->Caption = LTNX->Caption =
"------ Programming ------\r\n" "------ Programming ------\r\n"
"Stu, K6TU (Updated 1.66A -> 1.70A)\r\n" "Stu, K6TU (Updated 1.66A -> 1.70A)\r\n"
"Dave, AA6YQ (updated 1.65D -> 1.66G)\r\n" "Dave, AA6YQ (updated 1.65D -> 1.66G, 1.70F)\r\n"
"------ Help, FAQ and Remote mode, etc... ------\r\n" "------ Help, FAQ and Remote mode, etc... ------\r\n"
"Jan, KX2A Ken, VE5KC Bill, KB4IJ Andy, K3UK(KB2EOQ)\r\n" "Jan, KX2A Ken, VE5KC Bill, KB4IJ Andy, K3UK(KB2EOQ)\r\n"
"Bill, K5YG Phil, GU0SUP, Josef, OK2WO Oba, JA7UDE\r\n" "Bill, K5YG Phil, GU0SUP, Josef, OK2WO Oba, JA7UDE\r\n"

View file

@ -718,11 +718,13 @@ void CCradio::Timer(int tx, int interval)
SendCommand("\\$0000000003"); SendCommand("\\$0000000003");
break; break;
//1.66B AA6YQ //1.66B. 1.70E AA6YQ
case RADIO_POLLFT9000: case RADIO_POLLFT9000:
case RADIO_POLLFT2000: case RADIO_POLLFT2000:
case RADIO_POLLFT950: case RADIO_POLLFT950:
case RADIO_POLLFT450: case RADIO_POLLFT450:
case RADIO_POLLFT991:
case RADIO_POLLFT891:
m_rxcnt = 0; m_rxcnt = 0;
SendCommand("IF;"); SendCommand("IF;");
break; break;
@ -1035,19 +1037,34 @@ void CCradio::FreqKenwood(void)
} }
//AA6YQ 1.66B //AA6YQ 1.66B
//G3WYW Fix for FT-991 1.70B
void CCradio::FreqYaesu9K2K(void) void CCradio::FreqYaesu9K2K(void)
{ {
//0123456789012 //000000000011111111112222222222
//IF00021155000 +001000 0002000008 ; //012345678901234567890123456789
//abcdefghijklmnopqrstuvwxyz1234567890 <---- 桁位置 //IF000021155000+0000RTMVCTTS; <= FT991
//f - m 周波数 21.155MHz //IF00021155000+0000RTMVCTTS; <= FT9K2K
//abcdefghijklmnopqrstuvwxyz1234567890 <----<2D>@Digit position
//f - m Žü”g<E2809D>” freq<65>@21.155MHz
ULONG fq = 0; ULONG fq = 0;
//G3WYW Feb 2016 am I a FT-991 or FT9K2K?
if (m_rxbuf[26] == ';')
{ //FT9K2K
m_rxbuf[13] = 0;
if( sscanf((LPCSTR)&m_rxbuf[5], "%lu", &fq) == 1 ){
if( fq ) UpdateFreq(double(fq)/1e6);
}
}
else //FT991
{
m_rxbuf[14] = 0;
if( sscanf((LPCSTR)&m_rxbuf[5], "%lu", &fq) == 1 ){
if( fq ) UpdateFreq(double(fq)/1e6);
}
}
m_rxbuf[13] = 0;
if( sscanf((LPCSTR)&m_rxbuf[5], "%lu", &fq) == 1 ){
if( fq ) UpdateFreq(double(fq)/1e6);
}
} }
void CCradio::FreqJST245(void) void CCradio::FreqJST245(void)

View file

@ -86,7 +86,9 @@ enum {
RADIO_POLLFT9000, //1.66B AA6YQ add new radios at end of list as this value is stored in mmtty.ini RADIO_POLLFT9000, //1.66B AA6YQ add new radios at end of list as this value is stored in mmtty.ini
RADIO_POLLFT2000, //1.66B AA6YQ RADIO_POLLFT2000, //1.66B AA6YQ
RADIO_POLLFT950, //1.66B AA6YQ RADIO_POLLFT950, //1.66B AA6YQ
RADIO_POLLFT450, //1.66B AA6YQ RADIO_POLLFT450, //1.66B AA6YQ
RADIO_POLLFT991, //1.70E AA6YQ
RADIO_POLLFT891, //1.70E AA6YQ
}; };
class CCradio : public TThread class CCradio : public TThread

View file

@ -29,7 +29,7 @@
//Define Maker groups; index is used by IsCompatible to select the correct Maker based on PollType (RADIO_POLLx) //Define Maker groups; index is used by IsCompatible to select the correct Maker based on PollType (RADIO_POLLx)
LPCSTR __MK[]={ LPCSTR __MK[]={
"Yaesu FT 1000D, 1000MP, 920", //AA6YQ 1.66 cosmetic, MakerIndex=0 "Yaesu FT 1000D, 1000MP, 920", //AA6YQ 1.66 cosmetic, MakerIndex=0
"Yaesu FT 9000, 2000, 991, 950, 450", //AA6YQ 1.66 , MakerIndex=1 "Yaesu FT 9000, 2000, 991, 891, 950, 450", //AA6YQ 1.66 , MakerIndex=1
"Yaesu FT 736, 817, 847, 857, 897", //AA6YQ 1.66 cosmetic, MakerIndex=2 "Yaesu FT 736, 817, 847, 857, 897", //AA6YQ 1.66 cosmetic, MakerIndex=2
"Icom xx=addr 01-7F", // , MakerIndex=3 "Icom xx=addr 01-7F", // , MakerIndex=3
"Ten-Tec Omni VI xx=addr 00-64", // , MakerIndex=4 "Ten-Tec Omni VI xx=addr 00-64", // , MakerIndex=4
@ -68,10 +68,12 @@ const POLLDEF __VT0[]={
const POLLDEF __VT1[]={ const POLLDEF __VT1[]={
{ "NONE", 0 }, { "NONE", 0 },
{ "FT-9000", RADIO_POLLFT9000 }, //1.66B AA6YQ { "FT-9000", RADIO_POLLFT9000 }, //1.66B AA6YQ
{ "FT-2000", RADIO_POLLFT2000 }, //1.66B AA6YQ { "FT-2000", RADIO_POLLFT2000 }, //1.66B AA6YQ
{ "FT-950", RADIO_POLLFT950 }, //1.66B AA6YQ { "FT-950", RADIO_POLLFT950 }, //1.66B AA6YQ
{ "FT-450", RADIO_POLLFT450 }, //1.66B AA6YQ { "FT-450", RADIO_POLLFT450 }, //1.66B AA6YQ
{ "FT-991", RADIO_POLLFT991 }, //1.70E AA6YQ
{ "FT-891", RADIO_POLLFT891 }, //1.70E AA6YQ
{ NULL, 0 }, { NULL, 0 },
}; };
@ -121,10 +123,12 @@ const POLLDEF __VTUNKNOWN[]={
{ "KENWOOD (use auto info)", RADIO_POLLKENWOODN }, { "KENWOOD (use auto info)", RADIO_POLLKENWOODN },
{ "JST245", RADIO_POLLJST245 }, { "JST245", RADIO_POLLJST245 },
{ "JST245 (use auto info)", RADIO_POLLJST245N }, { "JST245 (use auto info)", RADIO_POLLJST245N },
{ "YAESU FT-9000", RADIO_POLLFT9000 }, //1.66B AA6YQ { "YAESU FT-9000", RADIO_POLLFT9000 }, //1.66B AA6YQ
{ "YAESU FT-2000", RADIO_POLLFT2000 }, //1.66B AA6YQ { "YAESU FT-2000", RADIO_POLLFT2000 }, //1.66B AA6YQ
{ "YAESU FT-950", RADIO_POLLFT950 }, //1.66B AA6YQ { "YAESU FT-950", RADIO_POLLFT950 }, //1.66B AA6YQ
{ "YAESU FT-450", RADIO_POLLFT450 }, //1.66B AA6YQ { "YAESU FT-450", RADIO_POLLFT450 }, //1.66B AA6YQ
{ "YAESU FT-991", RADIO_POLLFT991 }, //1.70E AA6YQ
{ "YAESU FT-891", RADIO_POLLFT891 }, //1.70E AA6YQ
{ NULL, 0 }, { NULL, 0 },
}; };
const POLLDEF *__VL[]={ const POLLDEF *__VL[]={
@ -151,7 +155,11 @@ __fastcall TRADIOSetDlg::TRADIOSetDlg(TComponent* AOwner)
for( int i = 0; i < m_MMList.GetCount(); i++ ){ for( int i = 0; i < m_MMList.GetCount(); i++ ){
PortName->Items->Insert(1, m_MMList.GetItemName(i)); PortName->Items->Insert(1, m_MMList.GetItemName(i));
} }
PortName->DropDownCount = PortName->Items->Count;
//AA6YQ 1.70E
//PortName->DropDownCount = PortName->Items->Count;
PortName->DropDownCount = 8;
m_DisEvent = 0; m_DisEvent = 0;
} }
//--------------------------------------------------------------------- //---------------------------------------------------------------------
@ -388,21 +396,27 @@ int __fastcall TRADIOSetDlg::IsCompatible(int PollType, int MakerIndex)
return 0; return 0;
} }
} }
else if (MakerIndex == 1) { //MakerIndex 1 is Yaesu FT-9000 et al else if (MakerIndex == 1) { //MakerIndex 1 is Yaesu FT-9000 et al
if (PollType == 0){ if (PollType == 0){
return 1; return 1;
} }
else if (PollType == RADIO_POLLFT9000) { else if (PollType == RADIO_POLLFT9000) {
return 1; return 1;
} }
else if (PollType == RADIO_POLLFT2000) { else if (PollType == RADIO_POLLFT2000) {
return 1; return 1;
} }
else if (PollType == RADIO_POLLFT950) { else if (PollType == RADIO_POLLFT950) {
return 1; return 1;
} }
else if (PollType == RADIO_POLLFT450) { else if (PollType == RADIO_POLLFT450) {
return 1; return 1;
}
else if (PollType == RADIO_POLLFT991) {
return 1;
}
else if (PollType == RADIO_POLLFT891) {
return 1;
} }
else { else {
return 0; return 0;

Binary file not shown.