mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-26 02:20:20 -04:00 
			
		
		
		
	WSPR band hopping improvements
Added a per band Rx only flag. Added Tx 100% as special case. Only do tune up if not an Rx only band and if not scheduled to Tx already. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5520 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									23d58d98a3
								
							
						
					
					
						commit
						a3b60ecb7b
					
				| @ -28,7 +28,7 @@ namespace | ||||
|   // These 10 bands are the hopping candidates and are globally coordinated
 | ||||
|   char const * const hopping_bands[] = {"160m", "80m", "60m", "40m", "30m", "20m", "17m", "15m", "12m", "10m"}; | ||||
|   size_t constexpr num_bands {sizeof (hopping_bands) / sizeof (hopping_bands[0])}; | ||||
|   char const * const periods[] = {"Sunrise grayline", "Day", "Sunset grayline", "Night", "Tune"}; | ||||
|   char const * const periods[] = {"Sunrise grayline", "Day", "Sunset grayline", "Night", "Tune", "Rx only"}; | ||||
|   size_t constexpr num_periods {sizeof (periods) / sizeof (periods[0])}; | ||||
|   char const * const title = "WSPR Band Hopping"; | ||||
| } | ||||
| @ -162,7 +162,14 @@ public: | ||||
|     , configuration_ {configuration} | ||||
|     , tx_percent_ {0} | ||||
|     , parent_widget_ {parent_widget} | ||||
|     , bands_ {QBitArray {num_bands}, QBitArray {num_bands}, QBitArray {num_bands}, QBitArray {num_bands}, QBitArray {num_bands}} | ||||
|     , bands_ { | ||||
|       QBitArray {num_bands}, | ||||
|       QBitArray {num_bands}, | ||||
|       QBitArray {num_bands}, | ||||
|       QBitArray {num_bands}, | ||||
|       QBitArray {num_bands}, | ||||
|       QBitArray {num_bands}, | ||||
|     } | ||||
|   { | ||||
|   } | ||||
| 
 | ||||
| @ -258,6 +265,11 @@ auto WSPRBandHopping::next_hop () -> Hop | ||||
|            , &m_->gray_line_duration_, &m_->tx_percent_, &period_index, &band_index | ||||
|            , &tx_next, my_grid.size ()); | ||||
| 
 | ||||
|   if (100 == m_->tx_percent_) | ||||
|     { | ||||
|       tx_next = 1; | ||||
|     } | ||||
| 
 | ||||
|   int frequencies_index {-1}; | ||||
|   auto const& frequencies = m_->configuration_->frequencies (); | ||||
|   auto const& filtered_bands = frequencies->filtered_bands (); | ||||
| @ -294,8 +306,18 @@ auto WSPRBandHopping::next_hop () -> Hop | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|   return {periods[period_index] | ||||
|   return { | ||||
|     periods[period_index] | ||||
| 
 | ||||
|     , frequencies_index | ||||
|       , frequencies_index >= 0 && m_->bands_[4].testBit (band_index) | ||||
|       , frequencies_index >= 0 && !!tx_next}; | ||||
| 
 | ||||
|     , frequencies_index >= 0  // new band
 | ||||
|       && !tx_next               // not going to Tx anyway
 | ||||
|       && m_->bands_[4].testBit (band_index) // tune up required
 | ||||
|       && !m_->bands_[5].testBit (band_index) // not an Rx only band
 | ||||
| 
 | ||||
|     , frequencies_index >= 0  // new band
 | ||||
|       && tx_next                // Tx scheduled
 | ||||
|       && !m_->bands_[5].testBit (band_index) // not an Rx only band
 | ||||
|    }; | ||||
| } | ||||
|  | ||||
| @ -4253,6 +4253,10 @@ void MainWindow::on_pbTxNext_clicked(bool b) | ||||
| void MainWindow::bandHopping() | ||||
| { | ||||
|   auto hop_data = m_WSPR_band_hopping.next_hop (); | ||||
|   qDebug () << "hop data: period:" << hop_data.period_name_ | ||||
|             << "frequencies index:" << hop_data.frequencies_index_ | ||||
|             << "tune:" << hop_data.tune_required_ | ||||
|             << "tx:" << hop_data.tx_next_; | ||||
| 
 | ||||
|   if (m_auto &&hop_data.tx_next_) { | ||||
|     m_nrx = 0; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user