mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-30 12:30:23 -04:00 
			
		
		
		
	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:
		
							parent
							
								
									06968e41d4
								
							
						
					
					
						commit
						05c3dadc99
					
				
										
											Binary file not shown.
										
									
								
							| @ -19,6 +19,8 @@ extern struct { | ||||
|   int nfb;                          //High decode limit (kHz)
 | ||||
|   int ntol;                         //+/- decoding range around fQSO (Hz)
 | ||||
|   int kin; | ||||
|   int nsynced; | ||||
|   int ndecoded; | ||||
| } jt9com_; | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -23,7 +23,7 @@ | ||||
|       <attribute name="title"> | ||||
|        <string>Station</string> | ||||
|       </attribute> | ||||
|       <widget class="QWidget" name=""> | ||||
|       <widget class="QWidget" name="layoutWidget"> | ||||
|        <property name="geometry"> | ||||
|         <rect> | ||||
|          <x>10</x> | ||||
| @ -121,6 +121,9 @@ | ||||
|             </item> | ||||
|             <item> | ||||
|              <widget class="QSpinBox" name="idIntSpinBox"> | ||||
|               <property name="enabled"> | ||||
|                <bool>false</bool> | ||||
|               </property> | ||||
|               <property name="maximumSize"> | ||||
|                <size> | ||||
|                 <width>60</width> | ||||
|  | ||||
| @ -15,13 +15,15 @@ subroutine decoder(ntrSeconds,nRxLog,c0) | ||||
|   integer*2 id2 | ||||
|   complex c0(NDMAX) | ||||
|   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 | ||||
|   data first/.true./ | ||||
|   save | ||||
| 
 | ||||
|   ntrMinutes=ntrSeconds/60 | ||||
|   newdat=1 | ||||
|   nsynced=0 | ||||
|   ndecoded=0 | ||||
| 
 | ||||
|   nsps=0 | ||||
|   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 | ||||
|            sbest=ccfred(i) | ||||
|            write(line,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width | ||||
|            if(nsync.gt.0) nsynced=1 | ||||
|         endif | ||||
| 
 | ||||
|         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) | ||||
|            write(14,1010) nutc,nsync,nsnr,xdt,1000.0+fpk,width,msg | ||||
|            fgood=f | ||||
|            nsynced=1 | ||||
|            ndecoded=1 | ||||
|         endif | ||||
|      endif | ||||
|   enddo | ||||
|  | ||||
| @ -49,8 +49,10 @@ MainWindow::MainWindow(QWidget *parent) : | ||||
|   ui->actionJT9_30->setActionGroup(modeGroup); | ||||
| 
 | ||||
|   QActionGroup* saveGroup = new QActionGroup(this); | ||||
|   ui->actionSave_all->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); | ||||
|   ui->actionNo_Deep_Search->setActionGroup(DepthGroup); | ||||
| @ -101,6 +103,8 @@ MainWindow::MainWindow(QWidget *parent) : | ||||
|   m_setftx=0; | ||||
|   m_loopall=false; | ||||
|   m_startAnother=false; | ||||
|   m_saveSynced=false; | ||||
|   m_saveDecoded=false; | ||||
|   m_saveAll=false; | ||||
|   m_sec0=-1; | ||||
|   m_palette="CuteSDR"; | ||||
| @ -231,6 +235,8 @@ void MainWindow::writeSettings() | ||||
|   settings.setValue("PaletteBlue",ui->actionBlue->isChecked()); | ||||
|   settings.setValue("Mode",m_mode); | ||||
|   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("NDepth",m_ndepth); | ||||
|   settings.setValue("KB8RQ",m_kb8rq); | ||||
| @ -277,6 +283,10 @@ void MainWindow::readSettings() | ||||
|                                  "PaletteBlue",false).toBool()); | ||||
|   m_mode=settings.value("Mode","JT9-1").toString(); | ||||
|   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()); | ||||
|   m_NB=settings.value("NB",false).toBool(); | ||||
|   ui->NBcheckBox->setChecked(m_NB); | ||||
| @ -285,6 +295,8 @@ void MainWindow::readSettings() | ||||
|   m_txFreq=settings.value("TxFreq",1500).toInt(); | ||||
|   ui->TxFreqSpinBox->setValue(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_ndepth=settings.value("NDepth",0).toInt(); | ||||
|   ui->actionF4_sets_Tx6->setChecked(m_kb8rq); | ||||
| @ -377,7 +389,9 @@ void MainWindow::dataSink(int k) | ||||
|     QDateTime t = QDateTime::currentDateTimeUtc(); | ||||
|     m_dateTime=t.toString("yyyy-MMM-dd hh:mm"); | ||||
|     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 imin=t.time().toString("mm").toInt(); | ||||
|       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()
 | ||||
| { | ||||
|   if (event->type() == QEvent::KeyPress) { | ||||
| @ -654,8 +652,6 @@ void MainWindow::on_actionWide_Waterfall_triggered()      //Display Waterfalls | ||||
|     g_pWideGraph->setWindowFlags(flags); | ||||
|     connect(g_pWideGraph, SIGNAL(freezeDecode2(int)),this, | ||||
|             SLOT(freezeDecode(int))); | ||||
|     connect(g_pWideGraph, SIGNAL(f11f12(int)),this, | ||||
|             SLOT(bumpDF(int))); | ||||
|   } | ||||
|   g_pWideGraph->show(); | ||||
| } | ||||
| @ -801,12 +797,34 @@ void MainWindow::on_actionAggressive_Deep_Search_triggered()  //Aggressive DS | ||||
| 
 | ||||
| void MainWindow::on_actionNone_triggered()                    //Save None
 | ||||
| { | ||||
|   m_saveSynced=false; | ||||
|   m_saveDecoded=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
 | ||||
| { | ||||
|   m_saveSynced=false; | ||||
|   m_saveDecoded=false; | ||||
|   m_saveAll=true; | ||||
|   ui->actionSave_all->setChecked(true); | ||||
| } | ||||
| 
 | ||||
| void MainWindow::on_actionKeyboard_shortcuts_triggered() | ||||
|  | ||||
| @ -94,7 +94,6 @@ private slots: | ||||
|   void on_dxGridEntry_textChanged(const QString &arg1); | ||||
|   void selectCall2(bool ctrl); | ||||
|   void on_genStdMsgsPushButton_clicked(); | ||||
|   void bumpDF(int n); | ||||
|   void on_logQSOButton_clicked(); | ||||
|   void on_actionErase_wsjtx_rx_log_triggered(); | ||||
|   void on_actionErase_wsjtx_tx_log_triggered(); | ||||
| @ -110,13 +109,16 @@ private slots: | ||||
|   void on_TxFreqSpinBox_valueChanged(int arg1); | ||||
|   void on_pbTxFreq_clicked(); | ||||
| 
 | ||||
|   void on_actionSave_synced_triggered(); | ||||
| 
 | ||||
|   void on_actionSave_decoded_triggered(); | ||||
| 
 | ||||
| private: | ||||
|     Ui::MainWindow *ui; | ||||
|     qint32  m_nDevIn; | ||||
|     qint32  m_nDevOut; | ||||
|     qint32  m_idInt; | ||||
|     qint32  m_waterfallAvg; | ||||
|     qint32  m_DF; | ||||
|     qint32  m_tol; | ||||
|     qint32  m_QSOfreq0; | ||||
|     qint32  m_ntx; | ||||
| @ -149,6 +151,8 @@ private: | ||||
|     bool    m_restart; | ||||
|     bool    m_killAll; | ||||
|     bool    m_startAnother; | ||||
|     bool    m_saveSynced; | ||||
|     bool    m_saveDecoded; | ||||
|     bool    m_saveAll; | ||||
|     bool    m_widebandDecode; | ||||
|     bool    m_kb8rq; | ||||
|  | ||||
| @ -1186,6 +1186,8 @@ p, li { white-space: pre-wrap; } | ||||
|      <string>Save</string> | ||||
|     </property> | ||||
|     <addaction name="actionNone"/> | ||||
|     <addaction name="actionSave_synced"/> | ||||
|     <addaction name="actionSave_decoded"/> | ||||
|     <addaction name="actionSave_all"/> | ||||
|    </widget> | ||||
|    <widget class="QMenu" name="menuHelp"> | ||||
| @ -1582,6 +1584,28 @@ p, li { white-space: pre-wrap; } | ||||
|     <string>JT9-30</string> | ||||
|    </property> | ||||
|   </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> | ||||
|  <layoutdefault spacing="6" margin="11"/> | ||||
|  <customwidgets> | ||||
|  | ||||
| @ -416,8 +416,6 @@ void CPlotter::setFcal(int n)                                  //setFcal() | ||||
| 
 | ||||
| int CPlotter::fQSO() {return m_fQSO;}                          //get fQSO
 | ||||
| 
 | ||||
| int CPlotter::DF() {return m_DF;}                              // get DF
 | ||||
| 
 | ||||
| void CPlotter::mousePressEvent(QMouseEvent *event)       //mousePressEvent
 | ||||
| { | ||||
|   int x=event->x(); | ||||
| @ -429,7 +427,6 @@ void CPlotter::mouseDoubleClickEvent(QMouseEvent *event)  //mouse2click | ||||
| //  int h = (m_Size.height()-60)/2;
 | ||||
|   int x=event->x(); | ||||
|   int y=event->y(); | ||||
|   m_DF=0; | ||||
|   setFQSO(x,false); | ||||
|   emit freezeDecode1(2);                  //### ???
 | ||||
| } | ||||
|  | ||||
| @ -35,7 +35,6 @@ public: | ||||
|   qint32  m_nSpan; | ||||
|   qint32  m_binsPerPixel; | ||||
|   qint32  m_fQSO; | ||||
|   qint32  m_DF; | ||||
|   qint32  m_tol; | ||||
|   qint32  m_fCal; | ||||
|   qint32  m_w; | ||||
| @ -59,7 +58,6 @@ public: | ||||
|   void setFcal(int n); | ||||
|   void DrawOverlay(); | ||||
|   int  fQSO(); | ||||
|   int  DF(); | ||||
|   int  autoZero(); | ||||
|   void setPalette(QString palette); | ||||
|   void setFsample(int n); | ||||
|  | ||||
| @ -20,6 +20,8 @@ extern struct { | ||||
|   int nfb;                          //High decode limit (kHz)
 | ||||
|   int ntol;                         //+/- decoding range around fQSO (Hz)
 | ||||
|   int kin; | ||||
|   int nsynced; | ||||
|   int ndecoded; | ||||
| } jt9com_; | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -224,25 +224,12 @@ int WideGraph::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) | ||||
| { | ||||
|   m_fCal=n; | ||||
|   ui->widePlot->setFcal(n); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| int WideGraph::DF() | ||||
| { | ||||
|   return ui->widePlot->m_DF; | ||||
| } | ||||
| 
 | ||||
| void WideGraph::on_autoZeroPushButton_clicked() | ||||
| { | ||||
|    int nzero=ui->widePlot->autoZero(); | ||||
|  | ||||
| @ -24,8 +24,6 @@ public: | ||||
|   int    nStartFreq(); | ||||
|   float  fSpan(); | ||||
|   void   saveSettings(); | ||||
|   void   setDF(int n); | ||||
|   int    DF(); | ||||
|   int    Tol(); | ||||
|   void   setTol(int n); | ||||
|   void   setFcal(int n); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user