mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-29 20:10:22 -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_sec = 0; | ||||||
| 	m_startingTimeStamp.tv_usec = 0; | 	m_startingTimeStamp.tv_usec = 0; | ||||||
| 	ui->setupUi(this); | 	ui->setupUi(this); | ||||||
|  | 
 | ||||||
| 	ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); | 	ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); | ||||||
| 	ui->centerFrequency->setValueRange(7, 0, pow(10,7)); | 	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())); | 	connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus())); | ||||||
| 	m_statusTimer.start(500); | 	m_statusTimer.start(500); | ||||||
| 	connect(&(deviceAPI->getMainWindow()->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick())); | 	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->freq->setText(QString::number(m_settings.m_centerFrequency / 1000)); | ||||||
|     ui->decim->setCurrentIndex(m_settings.m_log2Decim); |     ui->decim->setCurrentIndex(m_settings.m_log2Decim); | ||||||
|     ui->fcPos->setCurrentIndex(m_settings.m_fcPos); |     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->setText(m_settings.m_specificParameters); | ||||||
|     ui->specificParms->setCursorPosition(0); |     ui->specificParms->setCursorPosition(0); | ||||||
|     ui->txDelayText->setText(tr("%1").arg(m_settings.m_txDelay*100)); |     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; |     m_settings.m_sampleRate = value; | ||||||
|     uint32_t srate = ui->sampleRate->text().toInt(&ok); |     sendControl(); | ||||||
| 
 |  | ||||||
|     if (ok) |  | ||||||
|     { |  | ||||||
|         m_settings.m_sampleRate = srate * 1000; |  | ||||||
|         sendControl(); |  | ||||||
|     } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void SDRdaemonFECGui::on_specificParms_returnPressed() | void SDRdaemonFECGui::on_specificParms_returnPressed() | ||||||
|  | |||||||
| @ -131,7 +131,7 @@ private slots: | |||||||
| 	void on_controlPort_returnPressed(); | 	void on_controlPort_returnPressed(); | ||||||
| 	void on_sendButton_clicked(bool checked); | 	void on_sendButton_clicked(bool checked); | ||||||
| 	void on_freq_returnPressed(); | 	void on_freq_returnPressed(); | ||||||
| 	void on_sampleRate_returnPressed(); | 	void on_sampleRate_changed(quint64 value); | ||||||
| 	void on_specificParms_returnPressed(); | 	void on_specificParms_returnPressed(); | ||||||
| 	void on_decim_currentIndexChanged(int index); | 	void on_decim_currentIndexChanged(int index); | ||||||
| 	void on_fcPos_currentIndexChanged(int index); | 	void on_fcPos_currentIndexChanged(int index); | ||||||
|  | |||||||
| @ -381,6 +381,9 @@ | |||||||
|          <height>24</height> |          <height>24</height> | ||||||
|         </size> |         </size> | ||||||
|        </property> |        </property> | ||||||
|  |        <property name="toolTip"> | ||||||
|  |         <string>Desired number of FEC blocks per frame</string> | ||||||
|  |        </property> | ||||||
|        <property name="maximum"> |        <property name="maximum"> | ||||||
|         <number>64</number> |         <number>64</number> | ||||||
|        </property> |        </property> | ||||||
| @ -398,7 +401,7 @@ | |||||||
|         </size> |         </size> | ||||||
|        </property> |        </property> | ||||||
|        <property name="toolTip"> |        <property name="toolTip"> | ||||||
|         <string>Given number of FEC blocks per frame</string> |         <string>Desired number of FEC blocks per frame</string> | ||||||
|        </property> |        </property> | ||||||
|        <property name="text"> |        <property name="text"> | ||||||
|         <string>00</string> |         <string>00</string> | ||||||
| @ -450,7 +453,7 @@ | |||||||
|         </size> |         </size> | ||||||
|        </property> |        </property> | ||||||
|        <property name="toolTip"> |        <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> | ||||||
|        <property name="text"> |        <property name="text"> | ||||||
|         <string>000</string> |         <string>000</string> | ||||||
| @ -464,7 +467,7 @@ | |||||||
|       <widget class="QLabel" name="maxNbRecoveryText"> |       <widget class="QLabel" name="maxNbRecoveryText"> | ||||||
|        <property name="minimumSize"> |        <property name="minimumSize"> | ||||||
|         <size> |         <size> | ||||||
|          <width>24</width> |          <width>22</width> | ||||||
|          <height>0</height> |          <height>0</height> | ||||||
|         </size> |         </size> | ||||||
|        </property> |        </property> | ||||||
| @ -472,7 +475,7 @@ | |||||||
|         <string>Maximum number of recovery blocks used per frame</string> |         <string>Maximum number of recovery blocks used per frame</string> | ||||||
|        </property> |        </property> | ||||||
|        <property name="text"> |        <property name="text"> | ||||||
|         <string>000</string> |         <string>00</string> | ||||||
|        </property> |        </property> | ||||||
|        <property name="alignment"> |        <property name="alignment"> | ||||||
|         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | ||||||
| @ -848,34 +851,38 @@ | |||||||
|       </widget> |       </widget> | ||||||
|      </item> |      </item> | ||||||
|      <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"> |        <property name="minimumSize"> | ||||||
|         <size> |         <size> | ||||||
|          <width>0</width> |          <width>32</width> | ||||||
|          <height>0</height> |          <height>16</height> | ||||||
|         </size> |         </size> | ||||||
|        </property> |        </property> | ||||||
|        <property name="maximumSize"> |        <property name="font"> | ||||||
|         <size> |         <font> | ||||||
|          <width>50</width> |          <family>DejaVu Sans Mono</family> | ||||||
|          <height>16777215</height> |          <pointsize>12</pointsize> | ||||||
|         </size> |          <italic>false</italic> | ||||||
|  |         </font> | ||||||
|  |        </property> | ||||||
|  |        <property name="cursor"> | ||||||
|  |         <cursorShape>PointingHandCursor</cursorShape> | ||||||
|        </property> |        </property> | ||||||
|        <property name="toolTip"> |        <property name="toolTip"> | ||||||
|         <string>Sample rate (kS/s)</string> |         <string>Desired remote device sample rate</string> | ||||||
|        </property> |  | ||||||
|        <property name="text"> |  | ||||||
|         <string>00000</string> |  | ||||||
|        </property> |  | ||||||
|        <property name="alignment"> |  | ||||||
|         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> |  | ||||||
|        </property> |        </property> | ||||||
|       </widget> |       </widget> | ||||||
|      </item> |      </item> | ||||||
|      <item> |      <item> | ||||||
|       <widget class="QLabel" name="sampleRateUnits"> |       <widget class="QLabel" name="sampleRateUnits"> | ||||||
|        <property name="text"> |        <property name="text"> | ||||||
|         <string>kS/s</string> |         <string>S/s</string> | ||||||
|        </property> |        </property> | ||||||
|       </widget> |       </widget> | ||||||
|      </item> |      </item> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user