mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 13:10:19 -04:00 
			
		
		
		
	Implement NB=-1%, NB=-2%. Fix a startup problem with WideGraps's fMax value.
This commit is contained in:
		
							parent
							
								
									375a869a51
								
							
						
					
					
						commit
						52bdd57e57
					
				| @ -226,22 +226,25 @@ contains | |||||||
| 
 | 
 | ||||||
|       ndropmax=1 |       ndropmax=1 | ||||||
|       single_decode=iand(nexp_decode,32).ne.0 |       single_decode=iand(nexp_decode,32).ne.0 | ||||||
|  |       npct=0 | ||||||
|  |       nb=nexp_decode/256 - 2 | ||||||
|  |       if(nb.ge.0) npct=nb | ||||||
|       inb0=0 |       inb0=0 | ||||||
|       inb1=0 |  | ||||||
|       if((single_decode .or. lagain) .and. (ntol.le.20 .or. iwspr.ne.0)) then |  | ||||||
|       inb1=20 |       inb1=20 | ||||||
|  |       inb2=5 | ||||||
|  |       if(nb.eq.-1) then | ||||||
|  |          inb2=5                !Try NB = 0, 5, 10, 15, 20% | ||||||
|  |       else if(nb.eq.-2) then | ||||||
|  |          inb2=2                !Try NB = 0, 2, 4,... 20% | ||||||
|       else |       else | ||||||
|          ipct(0)=nexp_decode/256 |          inb1=0                !Fixed NB value, 0 to 25% | ||||||
|  |          ipct(0)=npct | ||||||
|       endif |       endif | ||||||
|        |  | ||||||
|       ndecodes=0 |       ndecodes=0 | ||||||
|       decodes=' ' |       decodes=' ' | ||||||
| 
 | 
 | ||||||
|       do inb=inb0,inb1,2 |       do inb=inb0,inb1,inb2 | ||||||
| !         npct=ipct(inb) |  | ||||||
|          npct=inb |          npct=inb | ||||||
|          write(*,3001) inb,inb1,lagain,single_decode,npct,ntol |  | ||||||
| 3001     format(2i4,2L3,2i5) |  | ||||||
|          call blanker(iwave,nfft1,ndropmax,npct,c_bigfft) |          call blanker(iwave,nfft1,ndropmax,npct,c_bigfft) | ||||||
| 
 | 
 | ||||||
| ! The big fft is done once and is used for calculating the smoothed spectrum | ! The big fft is done once and is used for calculating the smoothed spectrum | ||||||
| @ -277,6 +280,8 @@ contains | |||||||
|          fc2=0. |          fc2=0. | ||||||
|          do icand=1,ncand |          do icand=1,ncand | ||||||
|             fc0=candidates0(icand,1) |             fc0=candidates0(icand,1) | ||||||
|  |             if(iwspr.eq.0 .and. nb.lt.0 .and.                            & | ||||||
|  |                  abs(fc0-(nfqso+1.5*baud)).gt.ntol) cycle | ||||||
|             detmet=candidates0(icand,2) |             detmet=candidates0(icand,2) | ||||||
| 
 | 
 | ||||||
| ! Downconvert and downsample a slice of the spectrum centered on the | ! Downconvert and downsample a slice of the spectrum centered on the | ||||||
| @ -345,14 +350,12 @@ contains | |||||||
|          endif |          endif | ||||||
| 
 | 
 | ||||||
|          xsnr=0. |          xsnr=0. | ||||||
| !write(*,*) 'ncand ',ncand |  | ||||||
|          do icand=1,ncand |          do icand=1,ncand | ||||||
|             sync=candidates(icand,2) |             sync=candidates(icand,2) | ||||||
|             fc_synced=candidates(icand,3) |             fc_synced=candidates(icand,3) | ||||||
|             isbest=nint(candidates(icand,4)) |             isbest=nint(candidates(icand,4)) | ||||||
|             xdt=(isbest-nspsec)/fs2 |             xdt=(isbest-nspsec)/fs2 | ||||||
|             if(ntrperiod.eq.15) xdt=(isbest-real(nspsec)/2.0)/fs2 |             if(ntrperiod.eq.15) xdt=(isbest-real(nspsec)/2.0)/fs2 | ||||||
| !         write(*,*) icand,sync,fc_synced,isbest,xdt |  | ||||||
|             call timer('dwnsmpl ',0) |             call timer('dwnsmpl ',0) | ||||||
|             call fst4_downsample(c_bigfft,nfft1,ndown,fc_synced,sigbw,c2) |             call fst4_downsample(c_bigfft,nfft1,ndown,fc_synced,sigbw,c2) | ||||||
|             call timer('dwnsmpl ',1) |             call timer('dwnsmpl ',1) | ||||||
|  | |||||||
| @ -3127,7 +3127,7 @@ void MainWindow::decode()                                       //decode() | |||||||
|   dec_data.params.nexp_decode = static_cast<int> (m_config.special_op_id()); |   dec_data.params.nexp_decode = static_cast<int> (m_config.special_op_id()); | ||||||
|   if(m_config.single_decode()) dec_data.params.nexp_decode += 32; |   if(m_config.single_decode()) dec_data.params.nexp_decode += 32; | ||||||
|   if(m_config.enable_VHF_features()) dec_data.params.nexp_decode += 64; |   if(m_config.enable_VHF_features()) dec_data.params.nexp_decode += 64; | ||||||
|   if(m_mode.startsWith("FST4")) dec_data.params.nexp_decode += 256*ui->sbNB->value(); |   if(m_mode.startsWith("FST4")) dec_data.params.nexp_decode += 256*(ui->sbNB->value()+2); | ||||||
| 
 | 
 | ||||||
|   ::memcpy(dec_data.params.datetime, m_dateTime.toLatin1()+"    ", sizeof dec_data.params.datetime); |   ::memcpy(dec_data.params.datetime, m_dateTime.toLatin1()+"    ", sizeof dec_data.params.datetime); | ||||||
|   ::memcpy(dec_data.params.mycall, (m_config.my_callsign()+"            ").toLatin1(), sizeof dec_data.params.mycall); |   ::memcpy(dec_data.params.mycall, (m_config.my_callsign()+"            ").toLatin1(), sizeof dec_data.params.mycall); | ||||||
| @ -4241,7 +4241,7 @@ void MainWindow::guiUpdate() | |||||||
| //Once per second (onesec)
 | //Once per second (onesec)
 | ||||||
|   if(nsec != m_sec0) { |   if(nsec != m_sec0) { | ||||||
| //      qDebug() << "AAA" << nsec;
 | //      qDebug() << "AAA" << nsec;
 | ||||||
|     if(m_mode=="FST4") chk_FST4_freq_range(); |     if(m_mode=="FST4" and m_bOK_to_chk) chk_FST4_freq_range(); | ||||||
|     m_currentBand=m_config.bands()->find(m_freqNominal); |     m_currentBand=m_config.bands()->find(m_freqNominal); | ||||||
|     if( SpecOp::HOUND == m_config.special_op_id() ) { |     if( SpecOp::HOUND == m_config.special_op_id() ) { | ||||||
|       qint32 tHound=QDateTime::currentMSecsSinceEpoch()/1000 - m_tAutoOn; |       qint32 tHound=QDateTime::currentMSecsSinceEpoch()/1000 - m_tAutoOn; | ||||||
| @ -5931,9 +5931,6 @@ void MainWindow::on_actionFST4_triggered() | |||||||
|     ui->sbFtol->setValue(20); |     ui->sbFtol->setValue(20); | ||||||
|   } |   } | ||||||
|   setup_status_bar(false); |   setup_status_bar(false); | ||||||
|   ui->sbTR->values ({15, 30, 60, 120, 300, 900, 1800}); |  | ||||||
|   on_sbTR_valueChanged (ui->sbTR->value()); |  | ||||||
|   chk_FST4_freq_range(); |  | ||||||
|   ui->cbAutoSeq->setChecked(true); |   ui->cbAutoSeq->setChecked(true); | ||||||
|   m_wideGraph->setMode(m_mode); |   m_wideGraph->setMode(m_mode); | ||||||
|   m_wideGraph->setModeTx(m_modeTx); |   m_wideGraph->setModeTx(m_modeTx); | ||||||
| @ -5942,9 +5939,13 @@ void MainWindow::on_actionFST4_triggered() | |||||||
|   m_wideGraph->setTol(ui->sbFtol->value()); |   m_wideGraph->setTol(ui->sbFtol->value()); | ||||||
|   m_wideGraph->setTxFreq(ui->TxFreqSpinBox->value()); |   m_wideGraph->setTxFreq(ui->TxFreqSpinBox->value()); | ||||||
|   m_wideGraph->setFST4_FreqRange(ui->sbF_Low->value(),ui->sbF_High->value()); |   m_wideGraph->setFST4_FreqRange(ui->sbF_Low->value(),ui->sbF_High->value()); | ||||||
|  |   chk_FST4_freq_range(); | ||||||
|   switch_mode (Modes::FST4); |   switch_mode (Modes::FST4); | ||||||
|   m_wideGraph->setMode(m_mode); |   m_wideGraph->setMode(m_mode); | ||||||
|  |   ui->sbTR->values ({15, 30, 60, 120, 300, 900, 1800}); | ||||||
|  |   on_sbTR_valueChanged (ui->sbTR->value()); | ||||||
|   statusChanged(); |   statusChanged(); | ||||||
|  |   m_bOK_to_chk=true; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::on_actionFST4W_triggered() | void MainWindow::on_actionFST4W_triggered() | ||||||
| @ -7528,7 +7529,7 @@ void MainWindow::on_sbTR_valueChanged(int value) | |||||||
|     m_wideGraph->setPeriod (value, m_nsps); |     m_wideGraph->setPeriod (value, m_nsps); | ||||||
|     progressBar.setMaximum (value); |     progressBar.setMaximum (value); | ||||||
|   } |   } | ||||||
|   if(m_mode=="FST4") chk_FST4_freq_range(); |   if(m_mode=="FST4" and m_bOK_to_chk) chk_FST4_freq_range(); | ||||||
|   if(m_monitoring) { |   if(m_monitoring) { | ||||||
|     on_stopButton_clicked(); |     on_stopButton_clicked(); | ||||||
|     on_monitorButton_clicked(true); |     on_monitorButton_clicked(true); | ||||||
|  | |||||||
| @ -527,6 +527,7 @@ private: | |||||||
|   bool    m_bWarnedSplit=false; |   bool    m_bWarnedSplit=false; | ||||||
|   bool    m_bTUmsg; |   bool    m_bTUmsg; | ||||||
|   bool    m_bBestSPArmed=false; |   bool    m_bBestSPArmed=false; | ||||||
|  |   bool    m_bOK_to_chk=false; | ||||||
| 
 | 
 | ||||||
|   enum |   enum | ||||||
|     { |     { | ||||||
|  | |||||||
| @ -1018,28 +1018,6 @@ When not checked you can view the calibration results.</string> | |||||||
|                  </property> |                  </property> | ||||||
|                 </widget> |                 </widget> | ||||||
|                </item> |                </item> | ||||||
|                <item row="4" column="1"> |  | ||||||
|                 <widget class="QSpinBox" name="sbF_Low"> |  | ||||||
|                  <property name="alignment"> |  | ||||||
|                   <set>Qt::AlignCenter</set> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="prefix"> |  | ||||||
|                   <string>F Low   </string> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="minimum"> |  | ||||||
|                   <number>100</number> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="maximum"> |  | ||||||
|                   <number>5000</number> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="singleStep"> |  | ||||||
|                   <number>100</number> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="value"> |  | ||||||
|                   <number>600</number> |  | ||||||
|                  </property> |  | ||||||
|                 </widget> |  | ||||||
|                </item> |  | ||||||
|                <item row="5" column="1"> |                <item row="5" column="1"> | ||||||
|                 <widget class="QSpinBox" name="sbF_High"> |                 <widget class="QSpinBox" name="sbF_High"> | ||||||
|                  <property name="alignment"> |                  <property name="alignment"> | ||||||
| @ -1065,6 +1043,53 @@ When not checked you can view the calibration results.</string> | |||||||
|                  </property> |                  </property> | ||||||
|                 </widget> |                 </widget> | ||||||
|                </item> |                </item> | ||||||
|  |                <item row="4" column="1"> | ||||||
|  |                 <widget class="QSpinBox" name="sbF_Low"> | ||||||
|  |                  <property name="alignment"> | ||||||
|  |                   <set>Qt::AlignCenter</set> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="prefix"> | ||||||
|  |                   <string>F Low   </string> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="minimum"> | ||||||
|  |                   <number>100</number> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="maximum"> | ||||||
|  |                   <number>5000</number> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="singleStep"> | ||||||
|  |                   <number>100</number> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="value"> | ||||||
|  |                   <number>600</number> | ||||||
|  |                  </property> | ||||||
|  |                 </widget> | ||||||
|  |                </item> | ||||||
|  |                <item row="5" column="0"> | ||||||
|  |                 <widget class="QSpinBox" name="RxFreqSpinBox"> | ||||||
|  |                  <property name="toolTip"> | ||||||
|  |                   <string>Audio Rx frequency</string> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="alignment"> | ||||||
|  |                   <set>Qt::AlignCenter</set> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="suffix"> | ||||||
|  |                   <string>  Hz</string> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="prefix"> | ||||||
|  |                   <string>Rx  </string> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="minimum"> | ||||||
|  |                   <number>200</number> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="maximum"> | ||||||
|  |                   <number>5000</number> | ||||||
|  |                  </property> | ||||||
|  |                  <property name="value"> | ||||||
|  |                   <number>1500</number> | ||||||
|  |                  </property> | ||||||
|  |                 </widget> | ||||||
|  |                </item> | ||||||
|                <item row="4" column="0"> |                <item row="4" column="0"> | ||||||
|                 <layout class="QHBoxLayout" name="horizontalLayout_4"> |                 <layout class="QHBoxLayout" name="horizontalLayout_4"> | ||||||
|                  <item> |                  <item> | ||||||
| @ -1153,31 +1178,6 @@ When not checked you can view the calibration results.</string> | |||||||
|                  </item> |                  </item> | ||||||
|                 </layout> |                 </layout> | ||||||
|                </item> |                </item> | ||||||
|                <item row="5" column="0"> |  | ||||||
|                 <widget class="QSpinBox" name="RxFreqSpinBox"> |  | ||||||
|                  <property name="toolTip"> |  | ||||||
|                   <string>Audio Rx frequency</string> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="alignment"> |  | ||||||
|                   <set>Qt::AlignCenter</set> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="suffix"> |  | ||||||
|                   <string>  Hz</string> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="prefix"> |  | ||||||
|                   <string>Rx  </string> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="minimum"> |  | ||||||
|                   <number>200</number> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="maximum"> |  | ||||||
|                   <number>5000</number> |  | ||||||
|                  </property> |  | ||||||
|                  <property name="value"> |  | ||||||
|                   <number>1500</number> |  | ||||||
|                  </property> |  | ||||||
|                 </widget> |  | ||||||
|                </item> |  | ||||||
|                <item row="6" column="0"> |                <item row="6" column="0"> | ||||||
|                 <widget class="QSpinBox" name="rptSpinBox"> |                 <widget class="QSpinBox" name="rptSpinBox"> | ||||||
|                  <property name="toolTip"> |                  <property name="toolTip"> | ||||||
| @ -2470,6 +2470,9 @@ Yellow when too low</string> | |||||||
|         <property name="prefix"> |         <property name="prefix"> | ||||||
|          <string>NB  </string> |          <string>NB  </string> | ||||||
|         </property> |         </property> | ||||||
|  |         <property name="minimum"> | ||||||
|  |          <number>-2</number> | ||||||
|  |         </property> | ||||||
|         <property name="maximum"> |         <property name="maximum"> | ||||||
|          <number>25</number> |          <number>25</number> | ||||||
|         </property> |         </property> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user