UDPSink plugin: rename volume to gain

This commit is contained in:
f4exb 2017-08-17 17:09:02 +02:00
parent c601d8dbaa
commit 90ce3ec9ad
5 changed files with 14 additions and 7 deletions

View File

@ -15,16 +15,16 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "../../channelrx/udpsrc/udpsrcplugin.h"
#include "udpsrcplugin.h"
#include <QtPlugin>
#include "plugin/pluginapi.h"
#include "../../channelrx/udpsrc/udpsrcgui.h"
#include "udpsrcgui.h"
const PluginDescriptor UDPSrcPlugin::m_pluginDescriptor = {
QString("UDP Channel Source"),
QString("3.5.0"),
QString("3.6.0"),
QString("(c) Edouard Griffiths, F4EXB"),
QString("https://github.com/f4exb/sdrangel"),
true,

View File

@ -457,7 +457,7 @@ void UDPSinkGUI::on_udpPort_textEdited(const QString& arg1 __attribute__((unused
ui->applyBtn->setEnabled(true);
}
void UDPSinkGUI::on_volume_valueChanged(int value)
void UDPSinkGUI::on_gain_valueChanged(int value)
{
ui->gainText->setText(tr("%1").arg(value/10.0, 0, 'f', 1));
applySettings();

View File

@ -67,7 +67,7 @@ private slots:
void on_applyBtn_clicked();
void onWidgetRolled(QWidget* widget, bool rollDown);
void onMenuDoubleClicked();
void on_volume_valueChanged(int value);
void on_gain_valueChanged(int value);
void on_squelch_valueChanged(int value);
void on_channelMute_toggled(bool checked);
void tick();

View File

@ -76,7 +76,7 @@
<item>
<widget class="LevelMeterVU" name="volumeMeter" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -644,6 +644,12 @@
<layout class="QHBoxLayout" name="GainLayout">
<item>
<widget class="QLabel" name="gainLabel">
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<property name="text">
<string>Gain</string>
</property>

View File

@ -21,7 +21,8 @@ double CalcDb::dbPower(double magsq, double floordB)
{
if (magsq > 0)
{
return 10.0 * log10(magsq);
double val = 10.0 * log10(magsq);
return val > floordB ? val : floordB;
}
else
{