mirror of
https://github.com/n5ac/mmtty.git
synced 2026-01-20 07:10:16 +01:00
Version 1.70L
MMTTY displays the name of the profile in use on the demodulator pane. Added -p option that allows users to start MMTTY.exe with the predefined profile.
This commit is contained in:
parent
404953d354
commit
e2c13271c8
8
ComLib.h
8
ComLib.h
|
|
@ -32,7 +32,7 @@
|
|||
#include <SHELLAPI.H>
|
||||
//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 "K" //JA7UDE 1.70A -> 1.70B G3WYW FT-991 CAT support
|
||||
#define VERBETA "L" //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
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
//AA6YQ 1.70H correct regression in 1.70E that prevents correct frequency tracking for FT-891 and FT-991
|
||||
//AA6YQ 1.70J update documentation and URLs
|
||||
//AA6YQ 1.70K limit Help menu to one arrangement, increase height of VerDSP dialog, add "Setup always on top" option
|
||||
|
||||
//JA7UDE 1.70L display the profile name in use
|
||||
#define VERTTL2 "MMTTY "VERID VERBETA
|
||||
#define VERTTL VERTTL2" Licensed under LGPL" //1.70J
|
||||
|
||||
|
|
@ -307,6 +307,10 @@ typedef struct {
|
|||
int m_LogLink;
|
||||
|
||||
AnsiString m_LogName;
|
||||
AnsiString m_ProfileName; //JA7UDE 1.70L
|
||||
int m_ProfileNum; //JA7UDE 1.70L
|
||||
int m_ProfileNumNew; //JA7UDE 1.70L
|
||||
AnsiString m_ProfileStartUp;//JA7UDE 1.70L
|
||||
|
||||
int m_TxPort; // 0-Sound, 1-DTR, 2-TXD
|
||||
int m_TxdStop;
|
||||
|
|
|
|||
126
Main.cpp
126
Main.cpp
|
|
@ -505,6 +505,8 @@ __fastcall TMmttyWd::TMmttyWd(TComponent* Owner)
|
|||
sys.m_AutoTimeOffset = 0;
|
||||
sys.m_TimeOffset = 0;
|
||||
sys.m_TimeOffsetMin = 0;
|
||||
sys.m_ProfileName = "Startup"; //JA7UDE 1.70L
|
||||
sys.m_ProfileNum = -1; //JA7UDE 1.70L
|
||||
// Panel2->Top = GroupBox1->Height + 1; // Žó<C5BD>M‰æ–ʃTƒCƒY‚Ì’²<E28099>®
|
||||
UpdatePanel();
|
||||
LogLink.SetHandle(Handle, CM_CMML);
|
||||
|
|
@ -1702,7 +1704,20 @@ void __fastcall TMmttyWd::UpdateUI(void)
|
|||
}
|
||||
SelectCombo(TRUE);
|
||||
}
|
||||
if( m_filemode != pSound->WaveFile.m_mode ){
|
||||
if( sys.m_ProfileNum != sys.m_ProfileNumNew ){ //JA7UDE 1.70L
|
||||
AnsiString dem = "Demodulator "; //JA7UDE 1.70L
|
||||
switch( m_DemType ){
|
||||
case 0: dem += "(IIR) "; break;
|
||||
case 1: dem += "(FIR) "; break;
|
||||
case 2: dem += "(PLL) "; break;
|
||||
case 3: dem += "(FFT) "; break;
|
||||
default: break;
|
||||
}
|
||||
dem = dem + sys.m_ProfileName; //JA7UDE 1.70L
|
||||
GroupDem->Caption = dem; //JA7UDE 1.70L
|
||||
sys.m_ProfileNum = sys.m_ProfileNumNew; //JA7UDE 1.70L
|
||||
}
|
||||
if( m_filemode != pSound->WaveFile.m_mode ){
|
||||
m_filemode = pSound->WaveFile.m_mode;
|
||||
switch(m_filemode){
|
||||
case 0:
|
||||
|
|
@ -2240,9 +2255,37 @@ void __fastcall TMmttyWd::ReadRegister(void)
|
|||
if( verAA6YQ < VERAA6YQ ){
|
||||
pAA6YQ->m_bpfTaps = 512;
|
||||
pAA6YQ->m_befTaps = 256;
|
||||
}
|
||||
}
|
||||
if( pAA6YQ->m_fEnabled ) pAA6YQ->Create();
|
||||
delete pIniFile;
|
||||
|
||||
//Profile option at startup, JA7UDE 1.70L $$
|
||||
sprintf(bf, "%sUserPara.ini", BgnDir);
|
||||
pIniFile = new TMemIniFile(bf);
|
||||
if( sys.m_ProfileStartUp != "" ){
|
||||
char key[32];
|
||||
AnsiString pn;
|
||||
bool isReadProfile = false;
|
||||
for( int i = 0; i <= 1026; i++ ){
|
||||
if( i >= 16 && i <= 1024 )
|
||||
continue;
|
||||
sprintf(key, "Define%d", i);
|
||||
pn = pIniFile->ReadString( key, "Name", "Default" );
|
||||
if( pn.UpperCase() == sys.m_ProfileStartUp.UpperCase() ){
|
||||
ReadProfile( i, NULL );
|
||||
isReadProfile = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( !isReadProfile ){
|
||||
AnsiString msg = "Profile \"";
|
||||
msg += sys.m_ProfileStartUp;
|
||||
msg += "\" was specified, but it was not found in UserPara.ini. MMTTY will start with Profile \"Startup\".";
|
||||
msg += " Note that if your profile has a space character, surround it with double quotation marks.";
|
||||
MessageBox( NULL, msg.c_str(), "Warning", MB_OK );
|
||||
}
|
||||
}
|
||||
delete pIniFile;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
@ -6268,6 +6311,69 @@ void __fastcall TMmttyWd::KFFTW3Click(TObject *Sender)
|
|||
pSound->DrawFFT(pBitmapFFTIN, 1, KXYScope->Checked ? PBoxXY->Width : 0);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TMmttyWd::processOptions(LPTSTR opts) //JA7UDE 1.70L
|
||||
{
|
||||
|
||||
using std::string;
|
||||
using std::queue;
|
||||
string s;
|
||||
queue<string> queue_opts;
|
||||
int i;
|
||||
s = "";
|
||||
char sep = ' ';
|
||||
int l = strlen(opts);
|
||||
for( i = 0; i < l; i++ ){
|
||||
if( opts[i] == '"' ){
|
||||
if( sep != '"' ){
|
||||
sep = '"';
|
||||
}
|
||||
else{
|
||||
sep = ' ';
|
||||
}
|
||||
}
|
||||
else if( opts[i] == sep ){
|
||||
queue_opts.push(s);
|
||||
sep = ' ';
|
||||
s = "";
|
||||
continue;
|
||||
}
|
||||
else{
|
||||
s += opts[i];
|
||||
}
|
||||
}
|
||||
queue_opts.push(s);
|
||||
bool isProfileSpecified = false;
|
||||
while( !queue_opts.empty() ){
|
||||
string front = queue_opts.front();
|
||||
//const char *f = front.c_str();
|
||||
//printf( "%s", f );
|
||||
if( isProfileSpecified ){
|
||||
sys.m_ProfileStartUp = AnsiString( front.c_str() );
|
||||
break;
|
||||
}
|
||||
else if( front == "-p" ){
|
||||
isProfileSpecified = true;
|
||||
}
|
||||
queue_opts.pop();
|
||||
}
|
||||
/*
|
||||
char *tp;
|
||||
char s[1024];
|
||||
strcpy( s, opts );
|
||||
tp = strtok( s, " " );
|
||||
bool isProfileSpecified = false;
|
||||
while( tp != NULL ){
|
||||
tp = strtok( NULL, " " );
|
||||
if( tp != NULL && isProfileSpecified ){
|
||||
sys.m_ProfileStartUp = tp;
|
||||
break;
|
||||
}
|
||||
else if( tp != NULL && stricmp( tp, "-p" ) == 0 ){ //profile specified?
|
||||
isProfileSpecified = true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
void __fastcall TMmttyWd::FormShow(TObject *Sender)
|
||||
{
|
||||
if( Remote & REMSHOWOFF ){
|
||||
|
|
@ -8970,6 +9076,13 @@ void __fastcall TMmttyWd::ReadProfile(int n, LPCSTR pName)
|
|||
sprintf(key, "Define%d", n);
|
||||
|
||||
pSound->Suspend();
|
||||
if( n == 1025 ) //JA7UDE 1.70L $$
|
||||
sys.m_ProfileName = "Default"; //JA7UDE 1.70L
|
||||
else if( n == 1026 ) //JA7UDE 1.70L
|
||||
sys.m_ProfileName = "Startup"; //JA7UDE 1.70L
|
||||
else //JA7UDE 1.70L
|
||||
sys.m_ProfileName = pIniFile->ReadString( key, "Name", "Default" ); //JA7UDE 1.70L
|
||||
sys.m_ProfileNumNew = n; //JA7UDE 1.70L
|
||||
|
||||
sys.m_FixShift = pIniFile->ReadInteger(key, "AFCFixShift", sys.m_FixShift);
|
||||
sys.m_AFC = pIniFile->ReadInteger(key, "AFC", sys.m_AFC);
|
||||
|
|
@ -9328,6 +9441,7 @@ void __fastcall TMmttyWd::KSClick(TObject *Sender)
|
|||
TMenuItem *tp = GetKS(i);
|
||||
if( tp == (TMenuItem *)Sender ){
|
||||
ReadProfile(i, NULL);
|
||||
sys.m_ProfileNum = -1; //JA7UDE 1.70L
|
||||
UpdateItem();
|
||||
break;
|
||||
}
|
||||
|
|
@ -9467,6 +9581,7 @@ void __fastcall TMmttyWd::KSLDClick(TObject *Sender)
|
|||
void __fastcall TMmttyWd::KSDEFClick(TObject *Sender)
|
||||
{
|
||||
ReadProfile(1025, NULL);
|
||||
sys.m_ProfileNum = -1; //JA7UDE 1.70L
|
||||
UpdateItem();
|
||||
AdjustFocus();
|
||||
}
|
||||
|
|
@ -9474,6 +9589,7 @@ void __fastcall TMmttyWd::KSDEFClick(TObject *Sender)
|
|||
void __fastcall TMmttyWd::KSRETClick(TObject *Sender)
|
||||
{
|
||||
ReadProfile(1026, NULL);
|
||||
sys.m_ProfileNum = -1; //JA7UDE 1.70L
|
||||
UpdateItem();
|
||||
AdjustFocus();
|
||||
}
|
||||
|
|
@ -9925,3 +10041,9 @@ void __fastcall TMmttyWd::KExtCmdClick(TObject *Sender)
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
void __fastcall TMmttyWd::FormCreate(TObject *Sender)
|
||||
{
|
||||
processOptions(GetCommandLine()); //JA7UDE 1.70L
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
5
Main.h
5
Main.h
|
|
@ -37,6 +37,8 @@
|
|||
#include <ComCtrls.hpp>
|
||||
#include <Menus.hpp>
|
||||
#include <Dialogs.hpp>
|
||||
#include <string>
|
||||
#include <queue>
|
||||
//---------------------------------------------------------------------------
|
||||
#include "SendFile.h"
|
||||
#define USEPAL 1
|
||||
|
|
@ -647,6 +649,7 @@ __published: // IDE
|
|||
void __fastcall KMOptClick(TObject *Sender);
|
||||
void __fastcall KViewClick(TObject *Sender);
|
||||
void __fastcall KExtCmdClick(TObject *Sender);
|
||||
void __fastcall FormCreate(TObject *Sender);
|
||||
|
||||
|
||||
private: // ユーザー宣言
|
||||
|
|
@ -940,6 +943,8 @@ public: //
|
|||
void __fastcall SetRemoteFFT(void);
|
||||
//Radio command機能のインプリメント
|
||||
void __fastcall OpenCloseRadio(void);
|
||||
//
|
||||
void __fastcall processOptions(LPTSTR); //JA7UDE 1.70L
|
||||
|
||||
// void __fastcall TopWindow(void);
|
||||
|
||||
|
|
|
|||
18
mmtty.cbproj
18
mmtty.cbproj
|
|
@ -4,7 +4,7 @@
|
|||
<ProjectType>CppVCLApplication</ProjectType>
|
||||
<MainSource>mmtty.cpp</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Config Condition="'$(Config)'==''">Release</Config>
|
||||
<ProjectVersion>16.1</ProjectVersion>
|
||||
<AppType>Application</AppType>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
|
|
@ -96,6 +96,8 @@
|
|||
<Icon_MainIcon>mmtty_Icon.ico</Icon_MainIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<Icon_MainIcon>mmtty_Icon.ico</Icon_MainIcon>
|
||||
<Manifest_File>None</Manifest_File>
|
||||
<BCC_MonitorGlobalAndStackData>true</BCC_MonitorGlobalAndStackData>
|
||||
<BCC_MonitorThis>true</BCC_MonitorThis>
|
||||
<BCC_MonitorInlinePtrAccess>true</BCC_MonitorInlinePtrAccess>
|
||||
|
|
@ -119,7 +121,6 @@
|
|||
<BCC_MonitorGlobalAndStackData>false</BCC_MonitorGlobalAndStackData>
|
||||
<BCC_MonitorThis>false</BCC_MonitorThis>
|
||||
<BCC_MonitorInlinePtrAccess>false</BCC_MonitorInlinePtrAccess>
|
||||
<Manifest_File>None</Manifest_File>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<BCC_Defines>_DEBUG;$(BCC_Defines);$(BCC_Defines)</BCC_Defines>
|
||||
|
|
@ -129,11 +130,24 @@
|
|||
<BCC_Defines>_DEBUG;$(BCC_Defines);$(BCC_Defines)</BCC_Defines>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<Icon_MainIcon>mmtty_Icon.ico</Icon_MainIcon>
|
||||
<Manifest_File>None</Manifest_File>
|
||||
<IntermediateOutputDir>Release_Build</IntermediateOutputDir>
|
||||
<DCC_AdditionalSwitches> -M -$O+</DCC_AdditionalSwitches>
|
||||
<ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath);$(ILINK_LibraryPath)</ILINK_LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<FinalOutputDir>.</FinalOutputDir>
|
||||
<Debugger_HostApplication>D:\MyProjects\amprog\mmtty-JA7UDE-1.70Lp\mmtty.exe</Debugger_HostApplication>
|
||||
<Debugger_RunParams>-p Multi-path</Debugger_RunParams>
|
||||
<BCC_EliminateDuplicateExpressions>true</BCC_EliminateDuplicateExpressions>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<BCC_LoopInductionReduction>true</BCC_LoopInductionReduction>
|
||||
<BCC_ExpandIntrinsics>true</BCC_ExpandIntrinsics>
|
||||
<BCC_OptimizeJumps>true</BCC_OptimizeJumps>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<BCC_OptimizeVariables>true</BCC_OptimizeVariables>
|
||||
<BCC_EliminateDeadStore>true</BCC_EliminateDeadStore>
|
||||
<BCC_Defines>NDEBUG;$(BCC_Defines);$(BCC_Defines)</BCC_Defines>
|
||||
<BCC_UserSuppliedOptions> -tWM -Vx -d -Ve -r</BCC_UserSuppliedOptions>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
Start Length Name Class
|
||||
0001:00401000 00037FD98H _TEXT CODE
|
||||
0002:00781000 00003A9B8H _DATA DATA
|
||||
0003:007BB9B8 000032158H _BSS BSS
|
||||
0001:00401000 0003885B4H _TEXT CODE
|
||||
0002:0078A000 00003B06CH _DATA DATA
|
||||
0003:007C506C 000032170H _BSS BSS
|
||||
0004:00000000 0000000F8H _TLS TLS
|
||||
|
|
|
|||
Loading…
Reference in a new issue