mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
Channel Tx plugins: added support of MIMO devices
This commit is contained in:
parent
d113f05f1e
commit
d1b80524ea
@ -323,6 +323,9 @@ void FileSource::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("gainDB")) {
|
||||
settings.m_gainDB = response.getFileSourceSettings()->getGainDb();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getFileSourceSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getFileSourceSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -442,6 +445,9 @@ void FileSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys,
|
||||
if (channelSettingsKeys.contains("title") || force) {
|
||||
swgFileSourceSettings->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgFileSourceSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
||||
.arg(settings.m_reverseAPIAddress)
|
||||
@ -497,4 +503,9 @@ void FileSource::propagateMessageQueueToGUI()
|
||||
double FileSource::getMagSq() const
|
||||
{
|
||||
return m_basebandSource->getMagSq();
|
||||
}
|
||||
|
||||
uint32_t FileSource::getNumberOfDeviceStreams() const
|
||||
{
|
||||
return m_deviceAPI->getNbSinkStreams();
|
||||
}
|
@ -243,6 +243,7 @@ public:
|
||||
double getMagSq() const;
|
||||
void getMagSqLevels(double& avg, double& peak, int& nbSamples) const;
|
||||
void propagateMessageQueueToGUI();
|
||||
uint32_t getNumberOfDeviceStreams() const;
|
||||
|
||||
static const QString m_channelIdURI;
|
||||
static const QString m_channelId;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "device/deviceuiset.h"
|
||||
#include "dsp/hbfilterchainconverter.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "util/db.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
@ -300,6 +301,7 @@ void FileSourceGUI::displaySettings()
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_channelMarker.getTitle());
|
||||
displayStreamIndex();
|
||||
|
||||
blockApplySettings(true);
|
||||
ui->gain->setValue(m_settings.m_gainDB);
|
||||
@ -320,6 +322,15 @@ void FileSourceGUI::displayRateAndShift()
|
||||
m_channelMarker.setBandwidth(channelSampleRate);
|
||||
}
|
||||
|
||||
void FileSourceGUI::displayStreamIndex()
|
||||
{
|
||||
if (m_deviceUISet->m_deviceMIMOEngine) {
|
||||
setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex));
|
||||
} else {
|
||||
setStreamIndicator("S"); // single channel indicator
|
||||
}
|
||||
}
|
||||
|
||||
void FileSourceGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
m_channelMarker.setHighlighted(false);
|
||||
@ -376,6 +387,20 @@ void FileSourceGUI::onMenuDialogCalled(const QPoint &p)
|
||||
|
||||
applySettings();
|
||||
}
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_fileSource->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
displayStreamIndex();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
}
|
||||
|
@ -92,6 +92,7 @@ private:
|
||||
void updateWithStreamTime();
|
||||
void displaySettings();
|
||||
void displayRateAndShift();
|
||||
void displayStreamIndex();
|
||||
|
||||
void leaveEvent(QEvent*);
|
||||
void enterEvent(QEvent*);
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
const PluginDescriptor FileSourcePlugin::m_pluginDescriptor = {
|
||||
QString("File channel source"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -38,6 +38,7 @@ void FileSourceSettings::resetToDefaults()
|
||||
m_rgbColor = QColor(140, 4, 4).rgb();
|
||||
m_title = "File source";
|
||||
m_channelMarker = nullptr;
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
@ -60,6 +61,7 @@ QByteArray FileSourceSettings::serialize() const
|
||||
s.writeU32(10, m_reverseAPIPort);
|
||||
s.writeU32(11, m_reverseAPIDeviceIndex);
|
||||
s.writeU32(12, m_reverseAPIChannelIndex);
|
||||
s.writeS32(13, m_streamIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -87,11 +89,11 @@ bool FileSourceSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(4, &m_filterChainHash, 0);
|
||||
d.readS32(5, &itmp, 20);
|
||||
m_gainDB = itmp < -10 ? -10 : itmp > 50 ? 50 : itmp;
|
||||
d.readU32(5, &m_rgbColor, QColor(140, 4, 4).rgb());
|
||||
d.readString(6, &m_title, "File source");
|
||||
d.readBool(7, &m_useReverseAPI, false);
|
||||
d.readString(8, &m_reverseAPIAddress, "127.0.0.1");
|
||||
d.readU32(9, &tmp, 0);
|
||||
d.readU32(6, &m_rgbColor, QColor(140, 4, 4).rgb());
|
||||
d.readString(7, &m_title, "File source");
|
||||
d.readBool(8, &m_useReverseAPI, false);
|
||||
d.readString(9, &m_reverseAPIAddress, "127.0.0.1");
|
||||
d.readU32(10, &tmp, 0);
|
||||
|
||||
if ((tmp > 1023) && (tmp < 65535)) {
|
||||
m_reverseAPIPort = tmp;
|
||||
@ -99,10 +101,11 @@ bool FileSourceSettings::deserialize(const QByteArray& data)
|
||||
m_reverseAPIPort = 8888;
|
||||
}
|
||||
|
||||
d.readU32(10, &tmp, 0);
|
||||
m_reverseAPIDeviceIndex = tmp > 99 ? 99 : tmp;
|
||||
d.readU32(11, &tmp, 0);
|
||||
m_reverseAPIDeviceIndex = tmp > 99 ? 99 : tmp;
|
||||
d.readU32(12, &tmp, 0);
|
||||
m_reverseAPIChannelIndex = tmp > 99 ? 99 : tmp;
|
||||
d.readS32(13, &m_streamIndex, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ struct FileSourceSettings
|
||||
int m_gainDB;
|
||||
quint32 m_rgbColor;
|
||||
QString m_title;
|
||||
int m_streamIndex;
|
||||
bool m_useReverseAPI;
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
|
@ -391,6 +391,9 @@ void LocalSource::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
|
||||
settings.m_reverseAPIChannelIndex = response.getLocalSourceSettings()->getReverseApiChannelIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getLocalSourceSettings()->getStreamIndex();
|
||||
}
|
||||
}
|
||||
|
||||
void LocalSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const LocalSourceSettings& settings)
|
||||
@ -446,6 +449,9 @@ void LocalSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys,
|
||||
if (channelSettingsKeys.contains("filterChainHash") || force) {
|
||||
swgLocalSourceSettings->setFilterChainHash(settings.m_filterChainHash);
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgLocalSourceSettings->setRgbColor(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
||||
.arg(settings.m_reverseAPIAddress)
|
||||
@ -487,3 +493,8 @@ void LocalSource::networkManagerFinished(QNetworkReply *reply)
|
||||
|
||||
reply->deleteLater();
|
||||
}
|
||||
|
||||
uint32_t LocalSource::getNumberOfDeviceStreams() const
|
||||
{
|
||||
return m_deviceAPI->getNbSinkStreams();
|
||||
}
|
@ -127,6 +127,7 @@ public:
|
||||
SWGSDRangel::SWGChannelSettings& response);
|
||||
|
||||
void getLocalDevices(std::vector<uint32_t>& indexes);
|
||||
uint32_t getNumberOfDeviceStreams() const;
|
||||
|
||||
static const QString m_channelIdURI;
|
||||
static const QString m_channelId;
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "device/deviceuiset.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "dsp/hbfilterchainconverter.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
@ -179,6 +180,7 @@ void LocalSourceGUI::displaySettings()
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_channelMarker.getTitle());
|
||||
displayStreamIndex();
|
||||
|
||||
blockApplySettings(true);
|
||||
ui->interpolationFactor->setCurrentIndex(m_settings.m_log2Interp);
|
||||
@ -197,6 +199,15 @@ void LocalSourceGUI::displayRateAndShift()
|
||||
m_channelMarker.setBandwidth(channelSampleRate);
|
||||
}
|
||||
|
||||
void LocalSourceGUI::displayStreamIndex()
|
||||
{
|
||||
if (m_deviceUISet->m_deviceMIMOEngine) {
|
||||
setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex));
|
||||
} else {
|
||||
setStreamIndicator("S"); // single channel indicator
|
||||
}
|
||||
}
|
||||
|
||||
void LocalSourceGUI::updateLocalDevices()
|
||||
{
|
||||
std::vector<uint32_t> localDevicesIndexes;
|
||||
@ -265,6 +276,20 @@ void LocalSourceGUI::onMenuDialogCalled(const QPoint &p)
|
||||
|
||||
applySettings();
|
||||
}
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_localSource->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
displayStreamIndex();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
}
|
||||
|
@ -80,6 +80,7 @@ private:
|
||||
void applySettings(bool force = false);
|
||||
void displaySettings();
|
||||
void displayRateAndShift();
|
||||
void displayStreamIndex();
|
||||
void updateLocalDevices();
|
||||
|
||||
void leaveEvent(QEvent*);
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
const PluginDescriptor LocalSourcePlugin::m_pluginDescriptor = {
|
||||
QString("Local channel source"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -37,6 +37,7 @@ void LocalSourceSettings::resetToDefaults()
|
||||
m_filterChainHash = 0;
|
||||
m_channelMarker = nullptr;
|
||||
m_play = false;
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
@ -57,6 +58,7 @@ QByteArray LocalSourceSettings::serialize() const
|
||||
s.writeU32(11, m_reverseAPIChannelIndex);
|
||||
s.writeU32(12, m_log2Interp);
|
||||
s.writeU32(13, m_filterChainHash);
|
||||
s.writeS32(14, m_streamIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -96,6 +98,7 @@ bool LocalSourceSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(12, &tmp, 0);
|
||||
m_log2Interp = tmp > 6 ? 6 : tmp;
|
||||
d.readU32(13, &m_filterChainHash, 0);
|
||||
d.readS32(14, &m_streamIndex, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ struct LocalSourceSettings
|
||||
uint32_t m_log2Interp;
|
||||
uint32_t m_filterChainHash;
|
||||
bool m_play;
|
||||
int m_streamIndex;
|
||||
bool m_useReverseAPI;
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
|
@ -466,6 +466,9 @@ void AMMod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("modFactor")) {
|
||||
settings.m_modFactor = response.getAmModSettings()->getModFactor();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getAmModSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getAmModSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -588,6 +591,9 @@ void AMMod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const
|
||||
if (channelSettingsKeys.contains("modFactor") || force) {
|
||||
swgAMModSettings->setModFactor(settings.m_modFactor);
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgAMModSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
if (force)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
const PluginDescriptor AMModPlugin::m_pluginDescriptor = {
|
||||
QString("AM Modulator"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -470,6 +470,9 @@ void ATVMod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("title")) {
|
||||
settings.m_title = *response.getAtvModSettings()->getTitle();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getAtvModSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getAtvModSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -639,6 +642,9 @@ void ATVMod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, cons
|
||||
if (channelSettingsKeys.contains("title") || force) {
|
||||
swgATVModSettings->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgATVModSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
||||
.arg(settings.m_reverseAPIAddress)
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "dsp/dspengine.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "ui_atvmodgui.h"
|
||||
@ -715,6 +716,20 @@ void ATVModGUI::onMenuDialogCalled(const QPoint &p)
|
||||
|
||||
applySettings();
|
||||
}
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_atvMod->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
displayStreamIndex();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
}
|
||||
@ -748,6 +763,7 @@ void ATVModGUI::displaySettings()
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_channelMarker.getTitle());
|
||||
displayStreamIndex();
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
@ -796,6 +812,15 @@ void ATVModGUI::displaySettings()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void ATVModGUI::displayStreamIndex()
|
||||
{
|
||||
if (m_deviceUISet->m_deviceMIMOEngine) {
|
||||
setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex));
|
||||
} else {
|
||||
setStreamIndicator("S"); // single channel indicator
|
||||
}
|
||||
}
|
||||
|
||||
void ATVModGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
m_channelMarker.setHighlighted(false);
|
||||
|
@ -85,6 +85,7 @@ private:
|
||||
void blockApplySettings(bool block);
|
||||
void applySettings(bool force = false);
|
||||
void displaySettings();
|
||||
void displayStreamIndex();
|
||||
void updateWithStreamData();
|
||||
void updateWithStreamTime();
|
||||
void setRFFiltersSlidersRange(int sampleRate);
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
const PluginDescriptor ATVModPlugin::m_pluginDescriptor = {
|
||||
QString("ATV Modulator"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -51,6 +51,7 @@ void ATVModSettings::resetToDefaults()
|
||||
m_overlayText = "ATV";
|
||||
m_rgbColor = QColor(255, 255, 255).rgb();
|
||||
m_title = "ATV Modulator";
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
@ -89,6 +90,7 @@ QByteArray ATVModSettings::serialize() const
|
||||
s.writeU32(21, m_reverseAPIChannelIndex);
|
||||
s.writeString(22, m_imageFileName);
|
||||
s.writeString(23, m_videoFileName);
|
||||
s.writeS32(24, m_streamIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -154,6 +156,7 @@ bool ATVModSettings::deserialize(const QByteArray& data)
|
||||
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readString(22, &m_imageFileName);
|
||||
d.readString(23, &m_videoFileName);
|
||||
d.readS32(24, &m_streamIndex, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -82,6 +82,7 @@ struct ATVModSettings
|
||||
QString m_title;
|
||||
QString m_imageFileName;
|
||||
QString m_videoFileName;
|
||||
int m_streamIndex;
|
||||
bool m_useReverseAPI;
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
|
@ -428,6 +428,9 @@ void FreeDVMod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("audioDeviceName")) {
|
||||
settings.m_audioDeviceName = *response.getFreeDvModSettings()->getAudioDeviceName();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getFreeDvModSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getFreeDvModSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -554,6 +557,9 @@ void FreeDVMod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, c
|
||||
if (channelSettingsKeys.contains("audioDeviceName") || force) {
|
||||
swgFreeDVModSettings->setAudioDeviceName(new QString(settings.m_audioDeviceName));
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgFreeDVModSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
if (force)
|
||||
{
|
||||
@ -675,3 +681,8 @@ void FreeDVMod::setLevelMeter(QObject *levelMeter)
|
||||
{
|
||||
connect(m_basebandSource, SIGNAL(levelChanged(qreal, qreal, int)), levelMeter, SLOT(levelChanged(qreal, qreal, int)));
|
||||
}
|
||||
|
||||
uint32_t FreeDVMod::getNumberOfDeviceStreams() const
|
||||
{
|
||||
return m_deviceAPI->getNbSinkStreams();
|
||||
}
|
@ -262,6 +262,7 @@ public:
|
||||
CWKeyer *getCWKeyer();
|
||||
void setLevelMeter(QObject *levelMeter);
|
||||
void setSpectrumSampleSink(BasebandSampleSink* sampleSink);
|
||||
uint32_t getNumberOfDeviceStreams() const;
|
||||
|
||||
static const QString m_channelIdURI;
|
||||
static const QString m_channelId;
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/audioselectdialog.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "mainwindow.h"
|
||||
#include "ui_freedvmodgui.h"
|
||||
|
||||
@ -331,6 +332,20 @@ void FreeDVModGUI::onMenuDialogCalled(const QPoint &p)
|
||||
|
||||
applySettings();
|
||||
}
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_freeDVMod->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
displayStreamIndex();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
}
|
||||
@ -467,6 +482,7 @@ void FreeDVModGUI::displaySettings()
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_channelMarker.getTitle());
|
||||
displayStreamIndex();
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
@ -510,6 +526,15 @@ void FreeDVModGUI::displaySettings()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void FreeDVModGUI::displayStreamIndex()
|
||||
{
|
||||
if (m_deviceUISet->m_deviceMIMOEngine) {
|
||||
setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex));
|
||||
} else {
|
||||
setStreamIndicator("S"); // single channel indicator
|
||||
}
|
||||
}
|
||||
|
||||
void FreeDVModGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
m_channelMarker.setHighlighted(false);
|
||||
|
@ -88,6 +88,7 @@ private:
|
||||
void applyBandwidths(int spanLog2, bool force = false);
|
||||
void displayBandwidths(int spanLog2);
|
||||
void displaySettings();
|
||||
void displayStreamIndex();
|
||||
void updateWithStreamData();
|
||||
void updateWithStreamTime();
|
||||
void channelMarkerUpdate();
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
const PluginDescriptor FreeDVModPlugin::m_pluginDescriptor = {
|
||||
QString("FreeDV Modulator"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -44,6 +44,7 @@ void FreeDVModSettings::resetToDefaults()
|
||||
m_audioDeviceName = AudioDeviceManager::m_defaultDeviceName;
|
||||
m_freeDVMode = FreeDVMode::FreeDVMode2400A;
|
||||
m_gaugeInputElseModem = false;
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
@ -86,6 +87,7 @@ QByteArray FreeDVModSettings::serialize() const
|
||||
s.writeU32(24, m_reverseAPIPort);
|
||||
s.writeU32(25, m_reverseAPIDeviceIndex);
|
||||
s.writeU32(26, m_reverseAPIChannelIndex);
|
||||
s.writeS32(27, m_streamIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -166,6 +168,7 @@ bool FreeDVModSettings::deserialize(const QByteArray& data)
|
||||
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readU32(26, &utmp, 0);
|
||||
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readS32(27, &m_streamIndex, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -59,6 +59,7 @@ struct FreeDVModSettings
|
||||
QString m_audioDeviceName;
|
||||
FreeDVMode m_freeDVMode;
|
||||
bool m_gaugeInputElseModem; //!< Volume gauge shows speech input level else modem level
|
||||
int m_streamIndex;
|
||||
|
||||
bool m_useReverseAPI;
|
||||
QString m_reverseAPIAddress;
|
||||
|
@ -508,6 +508,9 @@ void NFMMod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("volumeFactor")) {
|
||||
settings.m_volumeFactor = response.getNfmModSettings()->getVolumeFactor();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getNfmModSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getNfmModSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -642,6 +645,9 @@ void NFMMod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, cons
|
||||
if (channelSettingsKeys.contains("ctcssIndex") || force) {
|
||||
swgNFMModSettings->setCtcssIndex(settings.m_ctcssIndex);
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgNFMModSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
if (force)
|
||||
{
|
||||
@ -738,3 +744,8 @@ void NFMMod::setLevelMeter(QObject *levelMeter)
|
||||
{
|
||||
connect(m_basebandSource, SIGNAL(levelChanged(qreal, qreal, int)), levelMeter, SLOT(levelChanged(qreal, qreal, int)));
|
||||
}
|
||||
|
||||
uint32_t NFMMod::getNumberOfDeviceStreams() const
|
||||
{
|
||||
return m_deviceAPI->getNbSinkStreams();
|
||||
}
|
@ -254,6 +254,7 @@ public:
|
||||
double getMagSq() const;
|
||||
CWKeyer *getCWKeyer();
|
||||
void setLevelMeter(QObject *levelMeter);
|
||||
uint32_t getNumberOfDeviceStreams() const;
|
||||
|
||||
static const QString m_channelIdURI;
|
||||
static const QString m_channelId;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/audioselectdialog.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "ui_nfmmodgui.h"
|
||||
@ -335,6 +336,20 @@ void NFMModGUI::onMenuDialogCalled(const QPoint &p)
|
||||
|
||||
applySettings();
|
||||
}
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_nfmMod->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
displayStreamIndex();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
}
|
||||
@ -456,6 +471,7 @@ void NFMModGUI::displaySettings()
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_channelMarker.getTitle());
|
||||
displayStreamIndex();
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
@ -498,6 +514,14 @@ void NFMModGUI::displaySettings()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void NFMModGUI::displayStreamIndex()
|
||||
{
|
||||
if (m_deviceUISet->m_deviceMIMOEngine) {
|
||||
setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex));
|
||||
} else {
|
||||
setStreamIndicator("S"); // single channel indicator
|
||||
}
|
||||
}
|
||||
|
||||
void NFMModGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
|
@ -82,6 +82,7 @@ private:
|
||||
void blockApplySettings(bool block);
|
||||
void applySettings(bool force = false);
|
||||
void displaySettings();
|
||||
void displayStreamIndex();
|
||||
void updateWithStreamData();
|
||||
void updateWithStreamTime();
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
const PluginDescriptor NFMModPlugin::m_pluginDescriptor = {
|
||||
QString("NFM Modulator"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -63,6 +63,7 @@ void NFMModSettings::resetToDefaults()
|
||||
m_feedbackAudioDeviceName = AudioDeviceManager::m_defaultDeviceName;
|
||||
m_feedbackVolumeFactor = 0.5f;
|
||||
m_feedbackAudioEnable = false;
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
@ -105,6 +106,7 @@ QByteArray NFMModSettings::serialize() const
|
||||
s.writeString(20, m_feedbackAudioDeviceName);
|
||||
s.writeReal(21, m_feedbackVolumeFactor);
|
||||
s.writeBool(22, m_feedbackAudioEnable);
|
||||
s.writeS32(23, m_streamIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -177,6 +179,7 @@ bool NFMModSettings::deserialize(const QByteArray& data)
|
||||
d.readString(20, &m_feedbackAudioDeviceName, AudioDeviceManager::m_defaultDeviceName);
|
||||
d.readReal(21, &m_feedbackVolumeFactor, 1.0);
|
||||
d.readBool(22, &m_feedbackAudioEnable, false);
|
||||
d.readS32(23, &m_streamIndex, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ struct NFMModSettings
|
||||
QString m_feedbackAudioDeviceName; //!< This is the audio device you send the audio samples to for audio feedback
|
||||
float m_feedbackVolumeFactor;
|
||||
bool m_feedbackAudioEnable;
|
||||
int m_streamIndex;
|
||||
bool m_useReverseAPI;
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
|
@ -475,6 +475,9 @@ void SSBMod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("audioDeviceName")) {
|
||||
settings.m_audioDeviceName = *response.getSsbModSettings()->getAudioDeviceName();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getSsbModSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getSsbModSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -621,6 +624,9 @@ void SSBMod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, cons
|
||||
if (channelSettingsKeys.contains("audioDeviceName") || force) {
|
||||
swgSSBModSettings->setAudioDeviceName(new QString(settings.m_audioDeviceName));
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgSSBModSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
if (force)
|
||||
{
|
||||
@ -726,4 +732,9 @@ unsigned int SSBMod::getAudioSampleRate() const
|
||||
void SSBMod::setSpectrumSink(BasebandSampleSink *sampleSink)
|
||||
{
|
||||
m_basebandSource->setSpectrumSink(sampleSink);
|
||||
}
|
||||
|
||||
uint32_t SSBMod::getNumberOfDeviceStreams() const
|
||||
{
|
||||
return m_deviceAPI->getNbSinkStreams();
|
||||
}
|
@ -257,6 +257,7 @@ public:
|
||||
void setLevelMeter(QObject *levelMeter);
|
||||
unsigned int getAudioSampleRate() const;
|
||||
void setSpectrumSink(BasebandSampleSink *sampleSink);
|
||||
uint32_t getNumberOfDeviceStreams() const;
|
||||
|
||||
static const QString m_channelIdURI;
|
||||
static const QString m_channelId;
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/audioselectdialog.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
SSBModGUI* SSBModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
|
||||
@ -381,6 +382,20 @@ void SSBModGUI::onMenuDialogCalled(const QPoint &p)
|
||||
|
||||
applySettings();
|
||||
}
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_ssbMod->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
displayStreamIndex();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
}
|
||||
@ -636,6 +651,7 @@ void SSBModGUI::displaySettings()
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_channelMarker.getTitle());
|
||||
displayStreamIndex();
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
@ -703,6 +719,15 @@ void SSBModGUI::displaySettings()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void SSBModGUI::displayStreamIndex()
|
||||
{
|
||||
if (m_deviceUISet->m_deviceMIMOEngine) {
|
||||
setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex));
|
||||
} else {
|
||||
setStreamIndicator("S"); // single channel indicator
|
||||
}
|
||||
}
|
||||
|
||||
void SSBModGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
m_channelMarker.setHighlighted(false);
|
||||
|
@ -90,6 +90,7 @@ private:
|
||||
void applySettings(bool force = false);
|
||||
void applyBandwidths(int spanLog2, bool force = false);
|
||||
void displaySettings();
|
||||
void displayStreamIndex();
|
||||
void updateWithStreamData();
|
||||
void updateWithStreamTime();
|
||||
void channelMarkerUpdate();
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
const PluginDescriptor SSBModPlugin::m_pluginDescriptor = {
|
||||
QString("SSB Modulator"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -66,6 +66,7 @@ void SSBModSettings::resetToDefaults()
|
||||
m_feedbackAudioDeviceName = AudioDeviceManager::m_defaultDeviceName;
|
||||
m_feedbackVolumeFactor = 0.5f;
|
||||
m_feedbackAudioEnable = false;
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
@ -115,6 +116,7 @@ QByteArray SSBModSettings::serialize() const
|
||||
s.writeString(27, m_feedbackAudioDeviceName);
|
||||
s.writeReal(28, m_feedbackVolumeFactor);
|
||||
s.writeBool(29, m_feedbackAudioEnable);
|
||||
s.writeS32(30, m_streamIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -201,6 +203,7 @@ bool SSBModSettings::deserialize(const QByteArray& data)
|
||||
d.readString(27, &m_feedbackAudioDeviceName, AudioDeviceManager::m_defaultDeviceName);
|
||||
d.readReal(28, &m_feedbackVolumeFactor, 1.0);
|
||||
d.readBool(29, &m_feedbackAudioEnable, false);
|
||||
d.readS32(30, &m_streamIndex, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ struct SSBModSettings
|
||||
QString m_feedbackAudioDeviceName; //!< This is the audio device you send the audio samples to for audio feedback
|
||||
float m_feedbackVolumeFactor;
|
||||
bool m_feedbackAudioEnable;
|
||||
int m_streamIndex;
|
||||
|
||||
bool m_useReverseAPI;
|
||||
QString m_reverseAPIAddress;
|
||||
|
@ -427,6 +427,9 @@ void WFMMod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("fmDeviation")) {
|
||||
settings.m_fmDeviation = response.getWfmModSettings()->getFmDeviation();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getWfmModSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getWfmModSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -550,6 +553,9 @@ void WFMMod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, cons
|
||||
if (channelSettingsKeys.contains("fmDeviation")) {
|
||||
swgWFMModSettings->setFmDeviation(settings.m_fmDeviation);
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
swgWFMModSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioDeviceName") || force) {
|
||||
swgWFMModSettings->setAudioDeviceName(new QString(settings.m_audioDeviceName));
|
||||
}
|
||||
@ -649,3 +655,8 @@ void WFMMod::setLevelMeter(QObject *levelMeter)
|
||||
{
|
||||
connect(m_basebandSource, SIGNAL(levelChanged(qreal, qreal, int)), levelMeter, SLOT(levelChanged(qreal, qreal, int)));
|
||||
}
|
||||
|
||||
uint32_t WFMMod::getNumberOfDeviceStreams() const
|
||||
{
|
||||
return m_deviceAPI->getNbSinkStreams();
|
||||
}
|
@ -254,6 +254,7 @@ public:
|
||||
double getMagSq() const;
|
||||
CWKeyer *getCWKeyer();
|
||||
void setLevelMeter(QObject *levelMeter);
|
||||
uint32_t getNumberOfDeviceStreams() const;
|
||||
|
||||
static const QString m_channelIdURI;
|
||||
static const QString m_channelId;
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "gui/crightclickenabler.h"
|
||||
#include "gui/audioselectdialog.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "ui_wfmmodgui.h"
|
||||
@ -310,6 +311,20 @@ void WFMModGUI::onMenuDialogCalled(const QPoint &p)
|
||||
|
||||
applySettings();
|
||||
}
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_wfmMod->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
displayStreamIndex();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
}
|
||||
@ -428,6 +443,7 @@ void WFMModGUI::displaySettings()
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_channelMarker.getTitle());
|
||||
displayStreamIndex();
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
@ -463,6 +479,15 @@ void WFMModGUI::displaySettings()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void WFMModGUI::displayStreamIndex()
|
||||
{
|
||||
if (m_deviceUISet->m_deviceMIMOEngine) {
|
||||
setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex));
|
||||
} else {
|
||||
setStreamIndicator("S"); // single channel indicator
|
||||
}
|
||||
}
|
||||
|
||||
void WFMModGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
m_channelMarker.setHighlighted(false);
|
||||
|
@ -81,6 +81,7 @@ private:
|
||||
void blockApplySettings(bool block);
|
||||
void applySettings(bool force = false);
|
||||
void displaySettings();
|
||||
void displayStreamIndex();
|
||||
void updateWithStreamData();
|
||||
void updateWithStreamTime();
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
const PluginDescriptor WFMModPlugin::m_pluginDescriptor = {
|
||||
QString("WFM Modulator"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -50,6 +50,7 @@ void WFMModSettings::resetToDefaults()
|
||||
m_title = "WFM Modulator";
|
||||
m_modAFInput = WFMModInputNone;
|
||||
m_audioDeviceName = AudioDeviceManager::m_defaultDeviceName;
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
@ -87,6 +88,7 @@ QByteArray WFMModSettings::serialize() const
|
||||
s.writeU32(15, m_reverseAPIPort);
|
||||
s.writeU32(16, m_reverseAPIDeviceIndex);
|
||||
s.writeU32(17, m_reverseAPIChannelIndex);
|
||||
s.writeS32(18, m_streamIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -152,6 +154,7 @@ bool WFMModSettings::deserialize(const QByteArray& data)
|
||||
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readU32(17, &utmp, 0);
|
||||
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
|
||||
d.readS32(18, &m_streamIndex, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ struct WFMModSettings
|
||||
QString m_title;
|
||||
WFMModInputAF m_modAFInput;
|
||||
QString m_audioDeviceName; //!< This is the audio device you get the audio samples from
|
||||
int m_streamIndex;
|
||||
bool m_useReverseAPI;
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
|
@ -252,6 +252,9 @@ void RemoteSource::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("title")) {
|
||||
settings.m_title = *response.getRemoteSourceSettings()->getTitle();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getRemoteSourceSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getRemoteSourceSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -355,6 +358,9 @@ void RemoteSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys
|
||||
if (channelSettingsKeys.contains("title") || force) {
|
||||
swgRemoteSourceSettings->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgRemoteSourceSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
||||
.arg(settings.m_reverseAPIAddress)
|
||||
@ -396,3 +402,8 @@ void RemoteSource::networkManagerFinished(QNetworkReply *reply)
|
||||
|
||||
reply->deleteLater();
|
||||
}
|
||||
|
||||
uint32_t RemoteSource::getNumberOfDeviceStreams() const
|
||||
{
|
||||
return m_deviceAPI->getNbSinkStreams();
|
||||
}
|
@ -204,6 +204,8 @@ public:
|
||||
const QStringList& channelSettingsKeys,
|
||||
SWGSDRangel::SWGChannelSettings& response);
|
||||
|
||||
uint32_t getNumberOfDeviceStreams() const;
|
||||
|
||||
static const QString m_channelIdURI;
|
||||
static const QString m_channelId;
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "device/deviceapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "remotesource.h"
|
||||
@ -241,6 +242,7 @@ void RemoteSourceGUI::displaySettings()
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_channelMarker.getTitle());
|
||||
displayStreamIndex();
|
||||
|
||||
blockApplySettings(true);
|
||||
ui->dataAddress->setText(m_settings.m_dataAddress);
|
||||
@ -248,6 +250,15 @@ void RemoteSourceGUI::displaySettings()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void RemoteSourceGUI::displayStreamIndex()
|
||||
{
|
||||
if (m_deviceUISet->m_deviceMIMOEngine) {
|
||||
setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex));
|
||||
} else {
|
||||
setStreamIndicator("S"); // single channel indicator
|
||||
}
|
||||
}
|
||||
|
||||
void RemoteSourceGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
m_channelMarker.setHighlighted(false);
|
||||
@ -304,6 +315,20 @@ void RemoteSourceGUI::onMenuDialogCalled(const QPoint &p)
|
||||
|
||||
applySettings();
|
||||
}
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_remoteSrc->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
displayStreamIndex();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ private:
|
||||
void blockApplySettings(bool block);
|
||||
void applySettings(bool force = false);
|
||||
void displaySettings();
|
||||
void displayStreamIndex();
|
||||
|
||||
void leaveEvent(QEvent*);
|
||||
void enterEvent(QEvent*);
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
const PluginDescriptor RemoteSourcePlugin::m_pluginDescriptor = {
|
||||
QString("Remote channel source"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -35,6 +35,7 @@ void RemoteSourceSettings::resetToDefaults()
|
||||
m_rgbColor = QColor(140, 4, 4).rgb();
|
||||
m_title = "Remote source";
|
||||
m_channelMarker = nullptr;
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
@ -54,6 +55,7 @@ QByteArray RemoteSourceSettings::serialize() const
|
||||
s.writeU32(7, m_reverseAPIPort);
|
||||
s.writeU32(8, m_reverseAPIDeviceIndex);
|
||||
s.writeU32(9, m_reverseAPIChannelIndex);
|
||||
s.writeS32(10, m_streamIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -98,6 +100,8 @@ bool RemoteSourceSettings::deserialize(const QByteArray& data)
|
||||
m_reverseAPIDeviceIndex = tmp > 99 ? 99 : tmp;
|
||||
d.readU32(9, &tmp, 0);
|
||||
m_reverseAPIChannelIndex = tmp > 99 ? 99 : tmp;
|
||||
d.readS32(10, &m_streamIndex, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -29,6 +29,7 @@ struct RemoteSourceSettings
|
||||
uint16_t m_dataPort; //!< Listening data port
|
||||
quint32 m_rgbColor;
|
||||
QString m_title;
|
||||
int m_streamIndex;
|
||||
bool m_useReverseAPI;
|
||||
QString m_reverseAPIAddress;
|
||||
uint16_t m_reverseAPIPort;
|
||||
|
@ -363,6 +363,9 @@ void UDPSource::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("title")) {
|
||||
settings.m_title = *response.getUdpSourceSettings()->getTitle();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getUdpSourceSettings()->getStreamIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getUdpSourceSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -515,6 +518,9 @@ void UDPSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, c
|
||||
if (channelSettingsKeys.contains("title") || force) {
|
||||
swgUDPSourceSettings->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgUDPSourceSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
||||
.arg(settings.m_reverseAPIAddress)
|
||||
@ -579,4 +585,9 @@ int32_t UDPSource::getBufferGauge() const
|
||||
bool UDPSource::getSquelchOpen() const
|
||||
{
|
||||
return m_basebandSource->getSquelchOpen();
|
||||
}
|
||||
|
||||
uint32_t UDPSource::getNumberOfDeviceStreams() const
|
||||
{
|
||||
return m_deviceAPI->getNbSinkStreams();
|
||||
}
|
@ -149,6 +149,7 @@ public:
|
||||
void setSpectrum(bool enabled);
|
||||
void resetReadIndex();
|
||||
void setLevelMeter(QObject *levelMeter);
|
||||
uint32_t getNumberOfDeviceStreams() const;
|
||||
|
||||
static const QString m_channelIdURI;
|
||||
static const QString m_channelId;
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "util/simpleserializer.h"
|
||||
#include "util/db.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "gui/devicestreamselectiondialog.h"
|
||||
#include "plugin/pluginapi.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
@ -218,6 +219,7 @@ void UDPSourceGUI::displaySettings()
|
||||
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
this->setWindowTitle(m_channelMarker.getTitle());
|
||||
displayStreamIndex();
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
@ -260,6 +262,15 @@ void UDPSourceGUI::displaySettings()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void UDPSourceGUI::displayStreamIndex()
|
||||
{
|
||||
if (m_deviceUISet->m_deviceMIMOEngine) {
|
||||
setStreamIndicator(tr("%1").arg(m_settings.m_streamIndex));
|
||||
} else {
|
||||
setStreamIndicator("S"); // single channel indicator
|
||||
}
|
||||
}
|
||||
|
||||
void UDPSourceGUI::channelMarkerChangedByCursor()
|
||||
{
|
||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||
@ -497,6 +508,20 @@ void UDPSourceGUI::onMenuDialogCalled(const QPoint &p)
|
||||
|
||||
applySettings();
|
||||
}
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_udpSource->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
displayStreamIndex();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ private:
|
||||
void blockApplySettings(bool block);
|
||||
void applySettings(bool force = false);
|
||||
void displaySettings();
|
||||
void displayStreamIndex();
|
||||
void setSampleFormat(int index);
|
||||
void setSampleFormatIndex(const UDPSourceSettings::SampleFormat& sampleFormat);
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
const PluginDescriptor UDPSourcePlugin::m_pluginDescriptor = {
|
||||
QString("UDP Channel Source"),
|
||||
QString("4.12.0"),
|
||||
QString("4.12.1"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -51,6 +51,7 @@ void UDPSourceSettings::resetToDefaults()
|
||||
m_udpPort = 9998;
|
||||
m_rgbColor = QColor(225, 25, 99).rgb();
|
||||
m_title = "UDP Sample Source";
|
||||
m_streamIndex = 0;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
m_reverseAPIPort = 8888;
|
||||
@ -90,6 +91,7 @@ QByteArray UDPSourceSettings::serialize() const
|
||||
s.writeU32(23, m_reverseAPIPort);
|
||||
s.writeU32(24, m_reverseAPIDeviceIndex);
|
||||
s.writeU32(25, m_reverseAPIChannelIndex);
|
||||
s.writeS32(26, m_streamIndex);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -181,6 +183,7 @@ bool UDPSourceSettings::deserialize(const QByteArray& data)
|
||||
m_reverseAPIDeviceIndex = u32tmp > 99 ? 99 : u32tmp;
|
||||
d.readU32(25, &u32tmp, 0);
|
||||
m_reverseAPIChannelIndex = u32tmp > 99 ? 99 : u32tmp;
|
||||
d.readS32(26, &m_streamIndex, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ struct UDPSourceSettings
|
||||
uint16_t m_udpPort;
|
||||
|
||||
QString m_title;
|
||||
int m_streamIndex;
|
||||
|
||||
bool m_useReverseAPI;
|
||||
QString m_reverseAPIAddress;
|
||||
|
Loading…
Reference in New Issue
Block a user