mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-12 10:48:42 -04:00
PlutoSDR input: display actual gain value returned from device
This commit is contained in:
@@ -538,6 +538,15 @@ void PlutoSDRInput::getRSSI(std::string& rssiStr)
|
||||
}
|
||||
}
|
||||
|
||||
void PlutoSDRInput::getGain(int& gaindB)
|
||||
{
|
||||
DevicePlutoSDRBox *plutoBox = m_deviceShared.m_deviceParams->getBox();
|
||||
|
||||
if (!plutoBox->getRxGain(gaindB, 0)) {
|
||||
gaindB = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool PlutoSDRInput::fetchTemperature()
|
||||
{
|
||||
DevicePlutoSDRBox *plutoBox = m_deviceShared.m_deviceParams->getBox();
|
||||
|
||||
@@ -90,6 +90,7 @@ public:
|
||||
uint32_t getADCSampleRate() const { return m_deviceSampleRates.m_addaConnvRate; }
|
||||
uint32_t getFIRSampleRate() const { return m_deviceSampleRates.m_hb1Rate; }
|
||||
void getRSSI(std::string& rssiStr);
|
||||
void getGain(int& gainStr);
|
||||
bool fetchTemperature();
|
||||
float getTemperature();
|
||||
|
||||
|
||||
@@ -386,6 +386,9 @@ void PlutoSDRInputGui::updateStatus()
|
||||
std::string rssiStr;
|
||||
((PlutoSDRInput *) m_sampleSource)->getRSSI(rssiStr);
|
||||
ui->rssiText->setText(tr("-%1").arg(QString::fromStdString(rssiStr)));
|
||||
int gaindB;
|
||||
((PlutoSDRInput *) m_sampleSource)->getGain(gaindB);
|
||||
ui->actualGainText->setText(tr("%1").arg(gaindB));
|
||||
}
|
||||
|
||||
if (m_statusCounter % 10 == 0) // 5s
|
||||
|
||||
@@ -848,6 +848,25 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="actualGainText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Actual gain (dB)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>00</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
|
||||
@@ -28,7 +28,7 @@ class DeviceSourceAPI;
|
||||
|
||||
const PluginDescriptor PlutoSDRInputPlugin::m_pluginDescriptor = {
|
||||
QString("PlutoSDR Input"),
|
||||
QString("3.7.3"),
|
||||
QString("3.7.4"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
||||
Reference in New Issue
Block a user