diff --git a/ComLib.h b/ComLib.h index 4a7fbc9..91e92fb 100644 --- a/ComLib.h +++ b/ComLib.h @@ -30,11 +30,19 @@ #include #include #include - -#define VERID "Ver1.70" //K6TU 1.68A -> 1.70A AA6YQ 1.65D->1.66G, JE3HHT 1.67 -#define VERBETA "D" //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.70D prevent shift > 4000 Hz so CSlideFFT::Create does not divide by zero + //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 "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 Group selector entry + //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 VERTTL VERTTL2" (C) JE3HHT 2000-2010." @@ -218,7 +226,8 @@ typedef struct { int m_SoundPriority; 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_SoundFifoRX; int m_SoundFifoTX; diff --git a/Main.cpp b/Main.cpp index 1e87491..9055380 100644 --- a/Main.cpp +++ b/Main.cpp @@ -458,6 +458,8 @@ __fastcall TMmttyWd::TMmttyWd(TComponent* Owner) sys.m_SoundPriority = 1; sys.m_SoundStereo = 0; + sys.m_HideFlexAudio=0; //AA6YQ 1.70E + sys.m_txuos = 1; sys.m_dblsft = 0; @@ -1586,7 +1588,12 @@ void __fastcall TMmttyWd::OpenClosePTT(void) delete pComm; pComm = NULL; 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:; @@ -2031,10 +2038,13 @@ void __fastcall TMmttyWd::ReadRegister(void) 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_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); 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); pSound->InitWFX(); 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", "SoundPriority", sys.m_SoundPriority); 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->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", "IIRBW", pSound->FSKDEM.m_iirfw); @@ -8665,7 +8677,13 @@ void __fastcall TMmttyWd::RemoteMMTTY(tagMSG &Msg) COMM.change = 1; 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: break; } diff --git a/Main.h b/Main.h index 04aba8f..4a96076 100644 --- a/Main.h +++ b/Main.h @@ -81,7 +81,8 @@ enum { RXM_SETLENGTH, 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_REQHANDLE, @@ -647,6 +648,8 @@ __published: // IDE void __fastcall KMOptClick(TObject *Sender); void __fastcall KViewClick(TObject *Sender); void __fastcall KExtCmdClick(TObject *Sender); + + private: // ユーザー宣言 WAVEFORMAT wfm; diff --git a/Option.cpp b/Option.cpp index e525676..a0117cd 100644 --- a/Option.cpp +++ b/Option.cpp @@ -37,7 +37,7 @@ static int PageIndexBPF = 0; // Static array to map selected audio devices from radio group index // 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 OutputDeviceMap[16]; //--------------------------------------------------------------------- @@ -64,7 +64,7 @@ __fastcall TOptionDlg::TOptionDlg(TComponent* AOwner) SetComboBox(pllVCOGain, MmttyWd->m_asVCOGain.c_str()); SetComboBox(pllLoopFC, MmttyWd->m_asLoopFC.c_str()); - //K6TU + //K6TU 1.70A // Amended enumeration of audio units to review the // first 32 units for each of input & output. // @@ -85,10 +85,12 @@ __fastcall TOptionDlg::TOptionDlg(TComponent* AOwner) devName = MmttyWd->pSound->GetInputSoundcard(CurrentUnit); cString = AnsiString(devName).c_str(); - if (strstr(cString, "IQ") || strstr(cString, "RESERVED")) { - // This is one of the FlexRadio audio devices we don't want - CurrentUnit++; - continue; + if (sys.m_HideFlexAudio) { //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... @@ -113,10 +115,12 @@ __fastcall TOptionDlg::TOptionDlg(TComponent* AOwner) devName = MmttyWd->pSound->GetOutputSoundcard(CurrentUnit); cString = AnsiString(devName).c_str(); - if (strstr(cString, "IQ") || strstr(cString, "RESERVED")) { - // This is one of the FlexRadio audio devices we don't want - CurrentUnit++; - continue; + if (sys.m_HideFlexAudio) { //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... @@ -514,9 +518,11 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp) FifoTX->Text = sys.m_SoundFifoTX; SoundPriority->ItemIndex = sys.m_SoundPriority; + HideFlexAudio->Checked = sys.m_HideFlexAudio; //AA6YQ 1.70E + if( sys.m_SoundDevice == -2 ){ DevNo->Text = sys.m_SoundMMW; - } + } else { DevNo->Text = sys.m_SoundDevice; } @@ -525,13 +531,14 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp) if( sys.m_SoundOutDevice == -2 ){ DevOutNo->Text = sys.m_SoundMMW; } - else { - DevOutNo->Text = sys.m_SoundOutDevice; - } + else { + DevOutNo->Text = sys.m_SoundOutDevice; + } //AA6YQ 1.66 - //K6TU + //K6TU 1.70A if (IsSoundcard (AnsiString(DevNo->Text).c_str())) { //JA7UDE 0428 + // Assuming that devices haven't been re-enumerated by Windows, // we need to find the corresponding unit number in the map in order // to select the right unit @@ -542,6 +549,7 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp) break; } } + InputSoundcards->ItemIndex = i != 16 ? i : -1; // 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 - //K6TU + //K6TU 1.70A if (IsSoundcard (AnsiString(DevOutNo->Text).c_str())) { //JA7UDE 0428 + // Assuming that devices haven't been re-enumerated by Windows, // we need to find the corresponding unit number in the map in order // to select the right unit @@ -562,8 +571,10 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp) break; } } + OutputSoundcards->ItemIndex = i != 16 ? i : -1; // OutputSoundcards->ItemIndex = atoi(AnsiString(DevOutNo->Text).c_str()); //AA6YQ 1.66 //JA7UDE 0428 + } else { OutputSoundcards->ItemIndex =-1; @@ -820,8 +831,10 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp) 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 - // 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 = dd; } @@ -832,7 +845,7 @@ int __fastcall TOptionDlg::Execute(CFSKDEM *fp, CFSKMOD *mp) //AA6YQ 1.66 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 = dd; } @@ -1560,7 +1573,9 @@ void __fastcall TOptionDlg::PortNameDropDown(TObject *Sender) for( int i = 0; i < m_MMList.GetCount(); 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) { - //AA6YQ 1.66 - DevNo->ItemIndex = InputSoundcards->ItemIndex+1; + //AA6YQ 1.66 + 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 } 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 } 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; +} +//--------------------------------------------------------------------------- + + diff --git a/Option.dfm b/Option.dfm index 8a80866..fb5a825 100644 Binary files a/Option.dfm and b/Option.dfm differ diff --git a/Option.h b/Option.h index 283dd92..afe65e3 100644 --- a/Option.h +++ b/Option.h @@ -270,7 +270,7 @@ __published: TLabel *Label2; TLabel *Label3; TTabSheet *TabSound; - TRadioGroup *InputSoundcards; + TRadioGroup *InputSoundcards; TRadioGroup *OutputSoundcards; TComboBox *Tones; TGroupBox *GB20; @@ -279,8 +279,9 @@ __published: TCheckBox *CBFix45; TCheckBox *CBAA6YQ; TSpeedButton *SBAA6YQ; + TCheckBox *HideFlexAudio; void __fastcall HamBtnClick(TObject *Sender); - + @@ -345,12 +346,15 @@ __published: void __fastcall DevOutNoDropDown(TObject *Sender); void __fastcall InputSoundcardsClick(TObject *Sender); - void __fastcall OutputSoundcardsClick(TObject *Sender); + void __fastcall OutputSoundcardsClick(TObject *Sender); void __fastcall DevNoClick(TObject *Sender); void __fastcall DevOutNoClick(TObject *Sender); void __fastcall SBAA6YQClick(TObject *Sender); + void __fastcall HideFlexAudioClick(TObject *Sender); + + private: int m_FontCharset; int m_FontStyle; @@ -390,4 +394,4 @@ public: //extern TAgcSetDlg *AgcSetDlg; extern int PageIndex; //---------------------------------------------------------------------------- -#endif +#endif diff --git a/Scope.dfm b/Scope.dfm index 24bdc76..330a7aa 100644 Binary files a/Scope.dfm and b/Scope.dfm differ diff --git a/VerDsp.cpp b/VerDsp.cpp index 86a1b7b..8311a55 100644 --- a/VerDsp.cpp +++ b/VerDsp.cpp @@ -47,7 +47,7 @@ __fastcall TVerDspDlg::TVerDspDlg(TComponent* AOwner) LTNX->Caption = "------ Programming ------\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" "Jan, KX2A Ken, VE5KC Bill, KB4IJ Andy, K3UK(KB2EOQ)\r\n" "Bill, K5YG Phil, GU0SUP, Josef, OK2WO Oba, JA7UDE\r\n" diff --git a/cradio.cpp b/cradio.cpp index 0a4dc31..468210c 100644 --- a/cradio.cpp +++ b/cradio.cpp @@ -718,11 +718,13 @@ void CCradio::Timer(int tx, int interval) SendCommand("\\$0000000003"); break; - //1.66B AA6YQ + //1.66B. 1.70E AA6YQ case RADIO_POLLFT9000: case RADIO_POLLFT2000: case RADIO_POLLFT950: - case RADIO_POLLFT450: + case RADIO_POLLFT450: + case RADIO_POLLFT991: + case RADIO_POLLFT891: m_rxcnt = 0; SendCommand("IF;"); break; @@ -1035,19 +1037,34 @@ void CCradio::FreqKenwood(void) } //AA6YQ 1.66B +//G3WYW Fix for FT-991 1.70B void CCradio::FreqYaesu9K2K(void) { -//0123456789012 -//IF00021155000 +001000 0002000008 ; -//abcdefghijklmnopqrstuvwxyz1234567890 <---- 桁位置 -//f - m 周波数 21.155MHz +//000000000011111111112222222222 +//012345678901234567890123456789 +//IF000021155000+0000RTMVCTTS; <= FT991 +//IF00021155000+0000RTMVCTTS; <= FT9K2K +//abcdefghijklmnopqrstuvwxyz1234567890 <---- Digit position +//f - m 周波数 freq 21.155MHz + + 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); + } + } - ULONG fq = 0; - - m_rxbuf[13] = 0; - if( sscanf((LPCSTR)&m_rxbuf[5], "%lu", &fq) == 1 ){ - if( fq ) UpdateFreq(double(fq)/1e6); - } } void CCradio::FreqJST245(void) diff --git a/cradio.h b/cradio.h index af3a020..23be242 100644 --- a/cradio.h +++ b/cradio.h @@ -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_POLLFT2000, //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 diff --git a/radioset.cpp b/radioset.cpp index 0bf6039..8dcf59e 100644 --- a/radioset.cpp +++ b/radioset.cpp @@ -29,7 +29,7 @@ //Define Maker groups; index is used by IsCompatible to select the correct Maker based on PollType (RADIO_POLLx) LPCSTR __MK[]={ "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 "Icom xx=addr 01-7F", // , MakerIndex=3 "Ten-Tec Omni VI xx=addr 00-64", // , MakerIndex=4 @@ -68,10 +68,12 @@ const POLLDEF __VT0[]={ 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 + { "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 + { "FT-991", RADIO_POLLFT991 }, //1.70E AA6YQ + { "FT-891", RADIO_POLLFT891 }, //1.70E AA6YQ { NULL, 0 }, }; @@ -121,10 +123,12 @@ const POLLDEF __VTUNKNOWN[]={ { "KENWOOD (use auto info)", RADIO_POLLKENWOODN }, { "JST245", RADIO_POLLJST245 }, { "JST245 (use auto info)", RADIO_POLLJST245N }, - { "YAESU FT-9000", RADIO_POLLFT9000 }, //1.66B AA6YQ - { "YAESU FT-2000", RADIO_POLLFT2000 }, //1.66B AA6YQ + { "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 + { "YAESU FT-991", RADIO_POLLFT991 }, //1.70E AA6YQ + { "YAESU FT-891", RADIO_POLLFT891 }, //1.70E AA6YQ { NULL, 0 }, }; const POLLDEF *__VL[]={ @@ -151,7 +155,11 @@ __fastcall TRADIOSetDlg::TRADIOSetDlg(TComponent* AOwner) for( int i = 0; i < m_MMList.GetCount(); 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; } //--------------------------------------------------------------------- @@ -388,21 +396,27 @@ int __fastcall TRADIOSetDlg::IsCompatible(int PollType, int MakerIndex) 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){ return 1; } else if (PollType == RADIO_POLLFT9000) { return 1; } - else if (PollType == RADIO_POLLFT2000) { + else if (PollType == RADIO_POLLFT2000) { return 1; } - else if (PollType == RADIO_POLLFT950) { - return 1; - } - else if (PollType == RADIO_POLLFT450) { - return 1; + else if (PollType == RADIO_POLLFT950) { + return 1; + } + else if (PollType == RADIO_POLLFT450) { + return 1; + } + else if (PollType == RADIO_POLLFT991) { + return 1; + } + else if (PollType == RADIO_POLLFT891) { + return 1; } else { return 0; diff --git a/radioset.dfm b/radioset.dfm index 7deed2b..b8314f4 100644 Binary files a/radioset.dfm and b/radioset.dfm differ