mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-31 13:00:26 -04:00 
			
		
		
		
	SDRdaemonFEC: implemented value dial for sample rate
This commit is contained in:
		
							parent
							
								
									405d4a2daa
								
							
						
					
					
						commit
						4349a7d622
					
				| @ -84,9 +84,13 @@ SDRdaemonFECGui::SDRdaemonFECGui(DeviceSourceAPI *deviceAPI, QWidget* parent) : | ||||
| 	m_startingTimeStamp.tv_sec = 0; | ||||
| 	m_startingTimeStamp.tv_usec = 0; | ||||
| 	ui->setupUi(this); | ||||
| 
 | ||||
| 	ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); | ||||
| 	ui->centerFrequency->setValueRange(7, 0, pow(10,7)); | ||||
| 
 | ||||
|     ui->sampleRate->setColorMapper(ColorMapper(ColorMapper::GrayGreenYellow)); | ||||
|     ui->sampleRate->setValueRange(7, 32000U, 9000000U); | ||||
| 
 | ||||
| 	connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); | ||||
| 	m_statusTimer.start(500); | ||||
| 	connect(&(deviceAPI->getMainWindow()->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick())); | ||||
| @ -310,7 +314,7 @@ void SDRdaemonFECGui::displaySettings() | ||||
|     ui->freq->setText(QString::number(m_settings.m_centerFrequency / 1000)); | ||||
|     ui->decim->setCurrentIndex(m_settings.m_log2Decim); | ||||
|     ui->fcPos->setCurrentIndex(m_settings.m_fcPos); | ||||
|     ui->sampleRate->setText(QString::number(m_settings.m_sampleRate / 1000)); | ||||
|     ui->sampleRate->setValue(m_settings.m_sampleRate); | ||||
|     ui->specificParms->setText(m_settings.m_specificParameters); | ||||
|     ui->specificParms->setCursorPosition(0); | ||||
|     ui->txDelayText->setText(tr("%1").arg(m_settings.m_txDelay*100)); | ||||
| @ -554,16 +558,10 @@ void SDRdaemonFECGui::on_freq_returnPressed() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void SDRdaemonFECGui::on_sampleRate_returnPressed() | ||||
| void SDRdaemonFECGui::on_sampleRate_changed(quint64 value) | ||||
| { | ||||
|     bool ok; | ||||
|     uint32_t srate = ui->sampleRate->text().toInt(&ok); | ||||
| 
 | ||||
|     if (ok) | ||||
|     { | ||||
|         m_settings.m_sampleRate = srate * 1000; | ||||
|         sendControl(); | ||||
|     } | ||||
|     m_settings.m_sampleRate = value; | ||||
|     sendControl(); | ||||
| } | ||||
| 
 | ||||
| void SDRdaemonFECGui::on_specificParms_returnPressed() | ||||
|  | ||||
| @ -131,7 +131,7 @@ private slots: | ||||
| 	void on_controlPort_returnPressed(); | ||||
| 	void on_sendButton_clicked(bool checked); | ||||
| 	void on_freq_returnPressed(); | ||||
| 	void on_sampleRate_returnPressed(); | ||||
| 	void on_sampleRate_changed(quint64 value); | ||||
| 	void on_specificParms_returnPressed(); | ||||
| 	void on_decim_currentIndexChanged(int index); | ||||
| 	void on_fcPos_currentIndexChanged(int index); | ||||
|  | ||||
| @ -381,6 +381,9 @@ | ||||
|          <height>24</height> | ||||
|         </size> | ||||
|        </property> | ||||
|        <property name="toolTip"> | ||||
|         <string>Desired number of FEC blocks per frame</string> | ||||
|        </property> | ||||
|        <property name="maximum"> | ||||
|         <number>64</number> | ||||
|        </property> | ||||
| @ -398,7 +401,7 @@ | ||||
|         </size> | ||||
|        </property> | ||||
|        <property name="toolTip"> | ||||
|         <string>Given number of FEC blocks per frame</string> | ||||
|         <string>Desired number of FEC blocks per frame</string> | ||||
|        </property> | ||||
|        <property name="text"> | ||||
|         <string>00</string> | ||||
| @ -450,7 +453,7 @@ | ||||
|         </size> | ||||
|        </property> | ||||
|        <property name="toolTip"> | ||||
|         <string>Minimum number of blocks retrieved per frame (green: all blocks received)</string> | ||||
|         <string>Minimum number of blocks retrieved per frame</string> | ||||
|        </property> | ||||
|        <property name="text"> | ||||
|         <string>000</string> | ||||
| @ -464,7 +467,7 @@ | ||||
|       <widget class="QLabel" name="maxNbRecoveryText"> | ||||
|        <property name="minimumSize"> | ||||
|         <size> | ||||
|          <width>24</width> | ||||
|          <width>22</width> | ||||
|          <height>0</height> | ||||
|         </size> | ||||
|        </property> | ||||
| @ -472,7 +475,7 @@ | ||||
|         <string>Maximum number of recovery blocks used per frame</string> | ||||
|        </property> | ||||
|        <property name="text"> | ||||
|         <string>000</string> | ||||
|         <string>00</string> | ||||
|        </property> | ||||
|        <property name="alignment"> | ||||
|         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | ||||
| @ -848,34 +851,38 @@ | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item> | ||||
|       <widget class="QLineEdit" name="sampleRate"> | ||||
|       <widget class="ValueDial" name="sampleRate" native="true"> | ||||
|        <property name="sizePolicy"> | ||||
|         <sizepolicy hsizetype="Maximum" vsizetype="Maximum"> | ||||
|          <horstretch>0</horstretch> | ||||
|          <verstretch>0</verstretch> | ||||
|         </sizepolicy> | ||||
|        </property> | ||||
|        <property name="minimumSize"> | ||||
|         <size> | ||||
|          <width>0</width> | ||||
|          <height>0</height> | ||||
|          <width>32</width> | ||||
|          <height>16</height> | ||||
|         </size> | ||||
|        </property> | ||||
|        <property name="maximumSize"> | ||||
|         <size> | ||||
|          <width>50</width> | ||||
|          <height>16777215</height> | ||||
|         </size> | ||||
|        <property name="font"> | ||||
|         <font> | ||||
|          <family>DejaVu Sans Mono</family> | ||||
|          <pointsize>12</pointsize> | ||||
|          <italic>false</italic> | ||||
|         </font> | ||||
|        </property> | ||||
|        <property name="cursor"> | ||||
|         <cursorShape>PointingHandCursor</cursorShape> | ||||
|        </property> | ||||
|        <property name="toolTip"> | ||||
|         <string>Sample rate (kS/s)</string> | ||||
|        </property> | ||||
|        <property name="text"> | ||||
|         <string>00000</string> | ||||
|        </property> | ||||
|        <property name="alignment"> | ||||
|         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | ||||
|         <string>Desired remote device sample rate</string> | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item> | ||||
|       <widget class="QLabel" name="sampleRateUnits"> | ||||
|        <property name="text"> | ||||
|         <string>kS/s</string> | ||||
|         <string>S/s</string> | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user