Remove m_DF and associated code.

Disable some presently un-implemented controls.
Begin implemnting "Save Synced" and "Save Decoded".
Set compilation to CONSOLE mode.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2706 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-10-30 16:49:24 +00:00
parent 06968e41d4
commit 05c3dadc99
13 changed files with 83 additions and 45 deletions

Binary file not shown.

View File

@ -19,6 +19,8 @@ extern struct {
int nfb; //High decode limit (kHz) int nfb; //High decode limit (kHz)
int ntol; //+/- decoding range around fQSO (Hz) int ntol; //+/- decoding range around fQSO (Hz)
int kin; int kin;
int nsynced;
int ndecoded;
} jt9com_; } jt9com_;
} }

View File

@ -23,7 +23,7 @@
<attribute name="title"> <attribute name="title">
<string>Station</string> <string>Station</string>
</attribute> </attribute>
<widget class="QWidget" name=""> <widget class="QWidget" name="layoutWidget">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>10</x>
@ -121,6 +121,9 @@
</item> </item>
<item> <item>
<widget class="QSpinBox" name="idIntSpinBox"> <widget class="QSpinBox" name="idIntSpinBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>60</width> <width>60</width>

View File

@ -15,13 +15,15 @@ subroutine decoder(ntrSeconds,nRxLog,c0)
integer*2 id2 integer*2 id2
complex c0(NDMAX) complex c0(NDMAX)
common/jt9com/ss(184,NSMAX),savg(NSMAX),id2(NMAX),nutc,ndiskdat, & common/jt9com/ss(184,NSMAX),savg(NSMAX),id2(NMAX),nutc,ndiskdat, &
ntr,nfqso,nagain,newdat,npts8,nfb,ntol,kin ntr,nfqso,nagain,newdat,npts8,nfb,ntol,kin,nsynced,ndecoded
logical first logical first
data first/.true./ data first/.true./
save save
ntrMinutes=ntrSeconds/60 ntrMinutes=ntrSeconds/60
newdat=1 newdat=1
nsynced=0
ndecoded=0
nsps=0 nsps=0
if(ntrMinutes.eq.1) then if(ntrMinutes.eq.1) then
@ -79,6 +81,7 @@ subroutine decoder(ntrSeconds,nRxLog,c0)
if(ccfred(i).gt.sbest .and. fgood.eq.0.0) then if(ccfred(i).gt.sbest .and. fgood.eq.0.0) then
sbest=ccfred(i) sbest=ccfred(i)
write(line,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width write(line,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width
if(nsync.gt.0) nsynced=1
endif endif
if(msg.ne.' ') then if(msg.ne.' ') then
@ -86,6 +89,8 @@ subroutine decoder(ntrSeconds,nRxLog,c0)
1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22) 1010 format(i4.4,i4,i5,f6.1,f8.2,f6.2,3x,a22)
write(14,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg write(14,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg
fgood=f fgood=f
nsynced=1
ndecoded=1
endif endif
endif endif
enddo enddo

View File

@ -49,8 +49,10 @@ MainWindow::MainWindow(QWidget *parent) :
ui->actionJT9_30->setActionGroup(modeGroup); ui->actionJT9_30->setActionGroup(modeGroup);
QActionGroup* saveGroup = new QActionGroup(this); QActionGroup* saveGroup = new QActionGroup(this);
ui->actionSave_all->setActionGroup(saveGroup);
ui->actionNone->setActionGroup(saveGroup); ui->actionNone->setActionGroup(saveGroup);
ui->actionSave_synced->setActionGroup(saveGroup);
ui->actionSave_decoded->setActionGroup(saveGroup);
ui->actionSave_all->setActionGroup(saveGroup);
QActionGroup* DepthGroup = new QActionGroup(this); QActionGroup* DepthGroup = new QActionGroup(this);
ui->actionNo_Deep_Search->setActionGroup(DepthGroup); ui->actionNo_Deep_Search->setActionGroup(DepthGroup);
@ -101,6 +103,8 @@ MainWindow::MainWindow(QWidget *parent) :
m_setftx=0; m_setftx=0;
m_loopall=false; m_loopall=false;
m_startAnother=false; m_startAnother=false;
m_saveSynced=false;
m_saveDecoded=false;
m_saveAll=false; m_saveAll=false;
m_sec0=-1; m_sec0=-1;
m_palette="CuteSDR"; m_palette="CuteSDR";
@ -231,6 +235,8 @@ void MainWindow::writeSettings()
settings.setValue("PaletteBlue",ui->actionBlue->isChecked()); settings.setValue("PaletteBlue",ui->actionBlue->isChecked());
settings.setValue("Mode",m_mode); settings.setValue("Mode",m_mode);
settings.setValue("SaveNone",ui->actionNone->isChecked()); settings.setValue("SaveNone",ui->actionNone->isChecked());
settings.setValue("SaveSynced",ui->actionSave_synced->isChecked());
settings.setValue("SaveDecoded",ui->actionSave_decoded->isChecked());
settings.setValue("SaveAll",ui->actionSave_all->isChecked()); settings.setValue("SaveAll",ui->actionSave_all->isChecked());
settings.setValue("NDepth",m_ndepth); settings.setValue("NDepth",m_ndepth);
settings.setValue("KB8RQ",m_kb8rq); settings.setValue("KB8RQ",m_kb8rq);
@ -277,6 +283,10 @@ void MainWindow::readSettings()
"PaletteBlue",false).toBool()); "PaletteBlue",false).toBool());
m_mode=settings.value("Mode","JT9-1").toString(); m_mode=settings.value("Mode","JT9-1").toString();
ui->actionNone->setChecked(settings.value("SaveNone",true).toBool()); ui->actionNone->setChecked(settings.value("SaveNone",true).toBool());
ui->actionSave_synced->setChecked(settings.value(
"SaveSynced",false).toBool());
ui->actionSave_decoded->setChecked(settings.value(
"SaveDecoded",false).toBool());
ui->actionSave_all->setChecked(settings.value("SaveAll",false).toBool()); ui->actionSave_all->setChecked(settings.value("SaveAll",false).toBool());
m_NB=settings.value("NB",false).toBool(); m_NB=settings.value("NB",false).toBool();
ui->NBcheckBox->setChecked(m_NB); ui->NBcheckBox->setChecked(m_NB);
@ -285,6 +295,8 @@ void MainWindow::readSettings()
m_txFreq=settings.value("TxFreq",1500).toInt(); m_txFreq=settings.value("TxFreq",1500).toInt();
ui->TxFreqSpinBox->setValue(m_txFreq); ui->TxFreqSpinBox->setValue(m_txFreq);
soundOutThread.setTxFreq(m_txFreq); soundOutThread.setTxFreq(m_txFreq);
m_saveSynced=ui->actionSave_synced->isChecked();
m_saveDecoded=ui->actionSave_decoded->isChecked();
m_saveAll=ui->actionSave_all->isChecked(); m_saveAll=ui->actionSave_all->isChecked();
m_ndepth=settings.value("NDepth",0).toInt(); m_ndepth=settings.value("NDepth",0).toInt();
ui->actionF4_sets_Tx6->setChecked(m_kb8rq); ui->actionF4_sets_Tx6->setChecked(m_kb8rq);
@ -377,7 +389,9 @@ void MainWindow::dataSink(int k)
QDateTime t = QDateTime::currentDateTimeUtc(); QDateTime t = QDateTime::currentDateTimeUtc();
m_dateTime=t.toString("yyyy-MMM-dd hh:mm"); m_dateTime=t.toString("yyyy-MMM-dd hh:mm");
decode(); //Start the decoder decode(); //Start the decoder
if(m_saveAll and !m_diskData) { if(!m_diskData and
(m_saveAll or (m_saveSynced and (jt9com_.nsynced==1))
or (m_saveDecoded and (jt9com_.ndecoded==1)))) {
int ihr=t.time().toString("hh").toInt(); int ihr=t.time().toString("hh").toInt();
int imin=t.time().toString("mm").toInt(); int imin=t.time().toString("mm").toInt();
imin=imin - (imin%(m_TRperiod/60)); imin=imin - (imin%(m_TRperiod/60));
@ -539,22 +553,6 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
} }
} }
void MainWindow::bumpDF(int n) //bumpDF()
{
if(n==11) {
int n0=g_pWideGraph->DF();
int n=(n0 + 10000) % 5;
if(n==0) n=5;
g_pWideGraph->setDF(n0-n);
}
if(n==12) {
int n0=g_pWideGraph->DF();
int n=(n0 + 10000) % 5;
if(n==0) n=5;
g_pWideGraph->setDF(n0+n);
}
}
bool MainWindow::eventFilter(QObject *object, QEvent *event) //eventFilter() bool MainWindow::eventFilter(QObject *object, QEvent *event) //eventFilter()
{ {
if (event->type() == QEvent::KeyPress) { if (event->type() == QEvent::KeyPress) {
@ -654,8 +652,6 @@ void MainWindow::on_actionWide_Waterfall_triggered() //Display Waterfalls
g_pWideGraph->setWindowFlags(flags); g_pWideGraph->setWindowFlags(flags);
connect(g_pWideGraph, SIGNAL(freezeDecode2(int)),this, connect(g_pWideGraph, SIGNAL(freezeDecode2(int)),this,
SLOT(freezeDecode(int))); SLOT(freezeDecode(int)));
connect(g_pWideGraph, SIGNAL(f11f12(int)),this,
SLOT(bumpDF(int)));
} }
g_pWideGraph->show(); g_pWideGraph->show();
} }
@ -801,12 +797,34 @@ void MainWindow::on_actionAggressive_Deep_Search_triggered() //Aggressive DS
void MainWindow::on_actionNone_triggered() //Save None void MainWindow::on_actionNone_triggered() //Save None
{ {
m_saveSynced=false;
m_saveDecoded=false;
m_saveAll=false; m_saveAll=false;
ui->actionNone->setChecked(true);
}
void MainWindow::on_actionSave_synced_triggered()
{
m_saveSynced=true;
m_saveDecoded=false;
m_saveAll=false;
ui->actionSave_synced->setChecked(true);
}
void MainWindow::on_actionSave_decoded_triggered()
{
m_saveSynced=false;
m_saveDecoded=true;
m_saveAll=false;
ui->actionSave_decoded->setChecked(true);
} }
void MainWindow::on_actionSave_all_triggered() //Save All void MainWindow::on_actionSave_all_triggered() //Save All
{ {
m_saveSynced=false;
m_saveDecoded=false;
m_saveAll=true; m_saveAll=true;
ui->actionSave_all->setChecked(true);
} }
void MainWindow::on_actionKeyboard_shortcuts_triggered() void MainWindow::on_actionKeyboard_shortcuts_triggered()

View File

@ -94,7 +94,6 @@ private slots:
void on_dxGridEntry_textChanged(const QString &arg1); void on_dxGridEntry_textChanged(const QString &arg1);
void selectCall2(bool ctrl); void selectCall2(bool ctrl);
void on_genStdMsgsPushButton_clicked(); void on_genStdMsgsPushButton_clicked();
void bumpDF(int n);
void on_logQSOButton_clicked(); void on_logQSOButton_clicked();
void on_actionErase_wsjtx_rx_log_triggered(); void on_actionErase_wsjtx_rx_log_triggered();
void on_actionErase_wsjtx_tx_log_triggered(); void on_actionErase_wsjtx_tx_log_triggered();
@ -110,13 +109,16 @@ private slots:
void on_TxFreqSpinBox_valueChanged(int arg1); void on_TxFreqSpinBox_valueChanged(int arg1);
void on_pbTxFreq_clicked(); void on_pbTxFreq_clicked();
void on_actionSave_synced_triggered();
void on_actionSave_decoded_triggered();
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
qint32 m_nDevIn; qint32 m_nDevIn;
qint32 m_nDevOut; qint32 m_nDevOut;
qint32 m_idInt; qint32 m_idInt;
qint32 m_waterfallAvg; qint32 m_waterfallAvg;
qint32 m_DF;
qint32 m_tol; qint32 m_tol;
qint32 m_QSOfreq0; qint32 m_QSOfreq0;
qint32 m_ntx; qint32 m_ntx;
@ -149,6 +151,8 @@ private:
bool m_restart; bool m_restart;
bool m_killAll; bool m_killAll;
bool m_startAnother; bool m_startAnother;
bool m_saveSynced;
bool m_saveDecoded;
bool m_saveAll; bool m_saveAll;
bool m_widebandDecode; bool m_widebandDecode;
bool m_kb8rq; bool m_kb8rq;

View File

@ -1186,6 +1186,8 @@ p, li { white-space: pre-wrap; }
<string>Save</string> <string>Save</string>
</property> </property>
<addaction name="actionNone"/> <addaction name="actionNone"/>
<addaction name="actionSave_synced"/>
<addaction name="actionSave_decoded"/>
<addaction name="actionSave_all"/> <addaction name="actionSave_all"/>
</widget> </widget>
<widget class="QMenu" name="menuHelp"> <widget class="QMenu" name="menuHelp">
@ -1582,6 +1584,28 @@ p, li { white-space: pre-wrap; }
<string>JT9-30</string> <string>JT9-30</string>
</property> </property>
</action> </action>
<action name="actionSave_synced">
<property name="checkable">
<bool>true</bool>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Save synced</string>
</property>
</action>
<action name="actionSave_decoded">
<property name="checkable">
<bool>true</bool>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Save decoded</string>
</property>
</action>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<customwidgets> <customwidgets>

View File

@ -416,8 +416,6 @@ void CPlotter::setFcal(int n) //setFcal()
int CPlotter::fQSO() {return m_fQSO;} //get fQSO int CPlotter::fQSO() {return m_fQSO;} //get fQSO
int CPlotter::DF() {return m_DF;} // get DF
void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent
{ {
int x=event->x(); int x=event->x();
@ -429,7 +427,6 @@ void CPlotter::mouseDoubleClickEvent(QMouseEvent *event) //mouse2click
// int h = (m_Size.height()-60)/2; // int h = (m_Size.height()-60)/2;
int x=event->x(); int x=event->x();
int y=event->y(); int y=event->y();
m_DF=0;
setFQSO(x,false); setFQSO(x,false);
emit freezeDecode1(2); //### ??? emit freezeDecode1(2); //### ???
} }

View File

@ -35,7 +35,6 @@ public:
qint32 m_nSpan; qint32 m_nSpan;
qint32 m_binsPerPixel; qint32 m_binsPerPixel;
qint32 m_fQSO; qint32 m_fQSO;
qint32 m_DF;
qint32 m_tol; qint32 m_tol;
qint32 m_fCal; qint32 m_fCal;
qint32 m_w; qint32 m_w;
@ -59,7 +58,6 @@ public:
void setFcal(int n); void setFcal(int n);
void DrawOverlay(); void DrawOverlay();
int fQSO(); int fQSO();
int DF();
int autoZero(); int autoZero();
void setPalette(QString palette); void setPalette(QString palette);
void setFsample(int n); void setFsample(int n);

View File

@ -20,6 +20,8 @@ extern struct {
int nfb; //High decode limit (kHz) int nfb; //High decode limit (kHz)
int ntol; //+/- decoding range around fQSO (Hz) int ntol; //+/- decoding range around fQSO (Hz)
int kin; int kin;
int nsynced;
int ndecoded;
} jt9com_; } jt9com_;
} }

View File

@ -224,25 +224,12 @@ int WideGraph::Tol()
return ui->widePlot->m_tol; return ui->widePlot->m_tol;
} }
void WideGraph::setDF(int n)
{
ui->widePlot->m_DF=n;
ui->widePlot->DrawOverlay();
ui->widePlot->update();
}
void WideGraph::setFcal(int n) void WideGraph::setFcal(int n)
{ {
m_fCal=n; m_fCal=n;
ui->widePlot->setFcal(n); ui->widePlot->setFcal(n);
} }
int WideGraph::DF()
{
return ui->widePlot->m_DF;
}
void WideGraph::on_autoZeroPushButton_clicked() void WideGraph::on_autoZeroPushButton_clicked()
{ {
int nzero=ui->widePlot->autoZero(); int nzero=ui->widePlot->autoZero();

View File

@ -24,8 +24,6 @@ public:
int nStartFreq(); int nStartFreq();
float fSpan(); float fSpan();
void saveSettings(); void saveSettings();
void setDF(int n);
int DF();
int Tol(); int Tol();
void setTol(int n); void setTol(int n);
void setFcal(int n); void setFcal(int n);

View File

@ -6,7 +6,7 @@
QT += core gui network QT += core gui network
CONFIG += qwt thread CONFIG += qwt thread
#CONFIG += console CONFIG += console
TARGET = wsjtx TARGET = wsjtx
VERSION = 0.2 VERSION = 0.2