LimeSDR output: added DAC sample rate display

pull/60/head
f4exb 2017-07-06 22:59:29 +02:00
rodzic 4cacce6fc0
commit 77e11004b0
5 zmienionych plików z 93 dodań i 45 usunięć

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 32 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 34 KiB

Wyświetl plik

@ -248,6 +248,17 @@ void LimeSDROutputGUI::updateSampleRateAndFrequency()
ui->deviceRateLabel->setText(tr("%1k").arg(QString::number(m_sampleRate / 1000.0f, 'g', 5)));
}
void LimeSDROutputGUI::updateDACRate()
{
uint32_t dacRate = m_settings.m_devSampleRate * (1<<m_settings.m_log2HardInterp);
if (dacRate < 100000000) {
ui->dacRateLabel->setText(tr("%1k").arg(QString::number(dacRate / 1000.0f, 'g', 5)));
} else {
ui->dacRateLabel->setText(tr("%1M").arg(QString::number(dacRate / 1000000.0f, 'g', 5)));
}
}
void LimeSDROutputGUI::displaySettings()
{
ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000);
@ -256,6 +267,8 @@ void LimeSDROutputGUI::displaySettings()
ui->hwInterp->setCurrentIndex(m_settings.m_log2HardInterp);
ui->swInterp->setCurrentIndex(m_settings.m_log2SoftInterp);
updateDACRate();
ui->lpf->setValue(m_settings.m_lpfBW / 1000);
ui->lpFIREnable->setChecked(m_settings.m_lpfFIREnable);
@ -404,6 +417,7 @@ void LimeSDROutputGUI::on_ncoReset_clicked(bool checked __attribute__((unused)))
void LimeSDROutputGUI::on_sampleRate_changed(quint64 value)
{
m_settings.m_devSampleRate = value;
updateDACRate();
setNCODisplay();
sendSettings();}
@ -412,6 +426,7 @@ void LimeSDROutputGUI::on_hwInterp_currentIndexChanged(int index)
if ((index <0) || (index > 5))
return;
m_settings.m_log2HardInterp = index;
updateDACRate();
setNCODisplay();
sendSettings();
}

Wyświetl plik

@ -69,6 +69,7 @@ private:
void setNCODisplay();
void sendSettings();
void updateSampleRateAndFrequency();
void updateDACRate();
void blockApplySettings(bool block);
private slots:

Wyświetl plik

@ -53,9 +53,9 @@
<number>2</number>
</property>
<item>
<layout class="QVBoxLayout" name="deviceUILayout">
<layout class="QVBoxLayout" name="freqLeftLayout">
<item>
<layout class="QHBoxLayout" name="deviceButtonsLayout">
<layout class="QHBoxLayout" name="freqLeftTopLayout">
<item>
<widget class="ButtonSwitch" name="startStop">
<property name="toolTip">
@ -74,11 +74,17 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="deviceRateLayout">
<layout class="QHBoxLayout" name="freqLeftBotLayout">
<item>
<widget class="QLabel" name="deviceRateLabel">
<widget class="QLabel" name="dacRateLabel">
<property name="minimumSize">
<size>
<width>54</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>I/Q sample rate kS/s</string>
<string>DAC rate after hardware upsampling (k or MS/s)</string>
</property>
<property name="text">
<string>00000k</string>
@ -137,43 +143,61 @@
</widget>
</item>
<item>
<widget class="QLabel" name="freqUnits">
<property name="text">
<string> kHz</string>
</property>
</widget>
</item>
<item>
<spacer name="freqRightlSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="channelNumberText">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Channel number</string>
</property>
<property name="text">
<string>#0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
<layout class="QVBoxLayout" name="freqRightLayout">
<item>
<layout class="QHBoxLayout" name="freqRightTopLayout">
<item>
<widget class="QLabel" name="freqUnits">
<property name="text">
<string> kHz</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="channelNumberText">
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Channel number</string>
</property>
<property name="text">
<string>#0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="freqRightBotLayout">
<item>
<widget class="QLabel" name="deviceRateLabel">
<property name="minimumSize">
<size>
<width>54</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Baseband I/Q sample rate kS/s</string>
</property>
<property name="text">
<string>00000k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>

Wyświetl plik

@ -41,14 +41,22 @@ Device start / stop button.
- Green square icon: device is running and can be stopped
- Magenta (or pink) square icon: an error occured. In the case the device was accidentally disconnected you may click on the icon to stop, plug back in, check the source on the sampling devices control panel and start again.
<h3>2: Baseband sample rate</h3>
<h3>2A: DAC sample rate</h3>
This is the baseband sample rate in kS/s before interpolation (9) to produce the final stream that is sent to the LimeSDR device. Thus this is the device sample rate (10) divided by the interpolation factor (9).
This is the sample rate at which the DAC runs in kS/s (k) or MS/s (M) after hardware interpolation (8). Thus this is the host to device sample rate (10) multiplied by the hardware interpolation factor (8).
<h3>2B: Baseband sample rate</h3>
This is the baseband sample rate in kS/s before interpolation (9) to produce the final stream that is sent to the LimeSDR device. Thus this is the host to device sample rate (10) divided by the software interpolation factor (9).
<h3>3: Frequency</h3>
<h3>3: Center frequency</h3>
This is the center frequency of transmission in kHz.
<h3>3A: Center frequency units</h3>
This is the center frequency units thus kHz (fixed)
<h3>4: Channel number</h3>
LimeSDR is a 2x2 MIMO device so it has two transmitting channels. This shows the corresponding Tx channel index (0 or 1).