mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-31 04:50:29 -04:00 
			
		
		
		
	WFM Modulator: set RF level to -1 dB
This commit is contained in:
		
							parent
							
								
									4ccb8610c5
								
							
						
					
					
						commit
						6ec6ab41b9
					
				| @ -40,6 +40,15 @@ const int NFMModGUI::m_rfBW[] = { | ||||
| }; | ||||
| const int NFMModGUI::m_nbRfBW = 11; | ||||
| 
 | ||||
| const float NFMModGUI::m_ctcssTones[] = { | ||||
|          67.0,  71.9,  74.4,  77.0,  79.7,  82.5,  85.4,  88.5,  91.5,  94.8, | ||||
|          97.4, 100.0, 103.5, 107.2, 110.9, 114.8, 118.8, 123.0, 127.3, 131.8, | ||||
|         136.5, 141.3, 146.2, 151.4, 156.7, 162.2, 167.9, 173.8, 179.9, 186.2, | ||||
|         192.8, 203.5 | ||||
| }; | ||||
| const int NFMModGUI::m_nbCTCSSTones = 32; | ||||
| 
 | ||||
| 
 | ||||
| NFMModGUI* NFMModGUI::create(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI) | ||||
| { | ||||
|     NFMModGUI* gui = new NFMModGUI(pluginAPI, deviceAPI); | ||||
| @ -399,6 +408,11 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* pa | ||||
|     ui->tone->setChecked(false); | ||||
|     ui->mic->setChecked(false); | ||||
| 
 | ||||
|     for (int i=0; i<m_nbCTCSSTones; i++) | ||||
|     { | ||||
|         ui->ctcss->addItem(QString("%1").arg((double) m_ctcssTones[i], 0, 'f', 1)); | ||||
|     } | ||||
| 
 | ||||
|     ui->cwKeyerGUI->setBuddies(m_nfmMod->getInputMessageQueue(), m_nfmMod->getCWKeyer()); | ||||
| 
 | ||||
| 	applySettings(); | ||||
|  | ||||
| @ -106,6 +106,9 @@ private: | ||||
|     static const int m_rfBW[]; | ||||
|     static const int m_nbRfBW; | ||||
| 
 | ||||
|     static const float m_ctcssTones[]; | ||||
|     static const int m_nbCTCSSTones; | ||||
| 
 | ||||
|     explicit NFMModGUI(PluginAPI* pluginAPI, DeviceSinkAPI *deviceAPI, QWidget* parent = NULL); | ||||
|     virtual ~NFMModGUI(); | ||||
| 
 | ||||
|  | ||||
| @ -6,7 +6,7 @@ | ||||
|    <rect> | ||||
|     <x>0</x> | ||||
|     <y>0</y> | ||||
|     <width>298</width> | ||||
|     <width>363</width> | ||||
|     <height>300</height> | ||||
|    </rect> | ||||
|   </property> | ||||
| @ -39,7 +39,7 @@ | ||||
|     <rect> | ||||
|      <x>2</x> | ||||
|      <y>2</y> | ||||
|      <width>280</width> | ||||
|      <width>341</width> | ||||
|      <height>271</height> | ||||
|     </rect> | ||||
|    </property> | ||||
| @ -512,6 +512,43 @@ | ||||
|         </property> | ||||
|        </spacer> | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="Line" name="line"> | ||||
|         <property name="orientation"> | ||||
|          <enum>Qt::Vertical</enum> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="QLabel" name="ctcssLabel"> | ||||
|         <property name="text"> | ||||
|          <string>CTCSS</string> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="QCheckBox" name="ctcssOn"> | ||||
|         <property name="toolTip"> | ||||
|          <string>Activate CTCSS</string> | ||||
|         </property> | ||||
|         <property name="text"> | ||||
|          <string/> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|       <item> | ||||
|        <widget class="QComboBox" name="ctcss"> | ||||
|         <property name="maximumSize"> | ||||
|          <size> | ||||
|           <width>60</width> | ||||
|           <height>16777215</height> | ||||
|          </size> | ||||
|         </property> | ||||
|         <property name="toolTip"> | ||||
|          <string>Set CTCSS Frequency</string> | ||||
|         </property> | ||||
|        </widget> | ||||
|       </item> | ||||
|      </layout> | ||||
|     </item> | ||||
|     <item> | ||||
|  | ||||
| @ -114,8 +114,8 @@ void WFMMod::pull(Sample& sample) | ||||
|     m_interpolatorDistanceRemain += m_interpolatorDistance; | ||||
| 
 | ||||
|     m_modPhasor += (m_running.m_fmDeviation / (float) m_running.m_outputSampleRate) * ri.real() * M_PI; | ||||
|     ci.real(cos(m_modPhasor) * 16384.0f); // -6 dB
 | ||||
|     ci.imag(sin(m_modPhasor) * 16384.0f); | ||||
|     ci.real(cos(m_modPhasor) * 29204.0f); // -1 dB
 | ||||
|     ci.imag(sin(m_modPhasor) * 29204.0f); | ||||
| 
 | ||||
|     // RF filtering is unnecessary
 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user