From a1efdcc8dc8ce4b8c6f0222cc5dc3601a5195af7 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 30 Sep 2015 06:57:40 +0200 Subject: [PATCH] New preset design: changed device registration --- include-gpl/plugin/pluginmanager.h | 28 ++-- include-gpl/settings/preset.h | 15 ++- include/plugin/plugininterface.h | 22 ++-- plugins/samplesource/airspy/airspyplugin.cpp | 11 +- .../samplesource/bladerf/bladerfplugin.cpp | 9 +- plugins/samplesource/fcdpro/fcdproplugin.cpp | 10 +- .../fcdproplus/fcdproplusplugin.cpp | 10 +- .../filesource/filesourceplugin.cpp | 6 +- plugins/samplesource/hackrf/hackrfplugin.cpp | 6 +- plugins/samplesource/rtlsdr/rtlsdrplugin.cpp | 8 +- sdrbase/mainwindow.cpp | 6 +- sdrbase/plugin/pluginmanager.cpp | 123 +++++++++++++----- sdrbase/settings/preset.cpp | 10 +- 13 files changed, 176 insertions(+), 88 deletions(-) diff --git a/include-gpl/plugin/pluginmanager.h b/include-gpl/plugin/pluginmanager.h index 7ff55ab5e..ce693a313 100644 --- a/include-gpl/plugin/pluginmanager.h +++ b/include-gpl/plugin/pluginmanager.h @@ -57,7 +57,7 @@ public: void updateSampleSourceDevices(); void fillSampleSourceSelector(QComboBox* comboBox); int selectSampleSource(int index); - int selectSampleSource(const QString& source); + int selectFirstSampleSource(const QString& sourceId); private: struct ChannelRegistration { @@ -86,10 +86,10 @@ private: typedef QList ChannelInstanceRegistrations; struct SampleSourceRegistration { - QString m_sourceName; + QString m_sourceId; PluginInterface* m_plugin; - SampleSourceRegistration(const QString& sourceName, PluginInterface* plugin) : - m_sourceName(sourceName), + SampleSourceRegistration(const QString& sourceId, PluginInterface* plugin) : + m_sourceId(sourceId), m_plugin(plugin) { } }; @@ -98,14 +98,20 @@ private: struct SampleSourceDevice { PluginInterface* m_plugin; QString m_displayName; - QString m_sourceName; - QByteArray m_address; + QString m_sourceId; + QString m_sourceSerial; + int m_sourceSequence; - SampleSourceDevice(PluginInterface* plugin, const QString& displayName, const QString& sourceName, const QByteArray& address) : + SampleSourceDevice(PluginInterface* plugin, + const QString& displayName, + const QString& sourceId, + const QString& sourceSerial, + int sourceSequence) : m_plugin(plugin), m_displayName(displayName), - m_sourceName(sourceName), - m_address(address) + m_sourceId(sourceId), + m_sourceSerial(sourceSerial), + m_sourceSequence(sourceSequence) { } }; typedef QList SampleSourceDevices; @@ -120,7 +126,9 @@ private: SampleSourceRegistrations m_sampleSourceRegistrations; SampleSourceDevices m_sampleSourceDevices; - QString m_sampleSourceName; + QString m_sampleSourceId; + QString m_sampleSourceSerial; + int m_sampleSourceSequence; PluginGUI* m_sampleSourcePluginGUI; void loadPlugins(const QDir& dir); diff --git a/include-gpl/settings/preset.h b/include-gpl/settings/preset.h index 9f33d78f6..891507388 100644 --- a/include-gpl/settings/preset.h +++ b/include-gpl/settings/preset.h @@ -42,12 +42,17 @@ public: int getChannelCount() const { return m_channelConfigs.count(); } const ChannelConfig& getChannelConfig(int index) const { return m_channelConfigs.at(index); } - void setSourceConfig(const QString& source, const QByteArray& config) + void setSourceConfig(const QString& sourceId, const QString& sourceSerial, int sourceSequence, const QByteArray& config) { - m_source = source; + m_sourceId = sourceId; + m_sourceSerial = sourceSerial; + m_sourceSequence = sourceSequence; m_sourceConfig = config; } - const QString& getSource() const { return m_source; } + + const QString& getSourceId() const { return m_sourceId; } + const QString& getSourceSerial() const { return m_sourceSerial; } + const int getSourceSequence() const { return m_sourceSequence; } const QByteArray& getSourceConfig() const { return m_sourceConfig; } protected: @@ -64,7 +69,9 @@ protected: bool m_iqImbalanceCorrection; // sample source and sample source configuration - QString m_source; + QString m_sourceId; + QString m_sourceSerial; + int m_sourceSequence; QByteArray m_sourceConfig; // channels and configurations diff --git a/include/plugin/plugininterface.h b/include/plugin/plugininterface.h index 6cb2109fe..39aa454b1 100644 --- a/include/plugin/plugininterface.h +++ b/include/plugin/plugininterface.h @@ -19,15 +19,21 @@ class PluginGUI; class PluginInterface { public: - struct SampleSourceDevice { + struct SampleSourceDevice + { QString displayedName; - QString name; - QByteArray address; + QString id; + QString serial; + int sequence; - SampleSourceDevice(const QString& _displayedName, const QString& _name, const QByteArray& _address) : + SampleSourceDevice(const QString& _displayedName, + const QString& _id, + const QString& _serial, + int _sequence) : displayedName(_displayedName), - name(_name), - address(_address) + id(_id), + serial(_serial), + sequence(_sequence) { } }; typedef QList SampleSourceDevices; @@ -37,10 +43,10 @@ public: virtual const PluginDescriptor& getPluginDescriptor() const = 0; virtual void initPlugin(PluginAPI* pluginAPI) = 0; - virtual PluginGUI* createChannel(const QString& channelName) { return NULL; } + virtual PluginGUI* createChannel(const QString& channelName) { return 0; } virtual SampleSourceDevices enumSampleSources() { return SampleSourceDevices(); } - virtual PluginGUI* createSampleSourcePluginGUI(const QString& sourceName, const QByteArray& address) { return NULL; } + virtual PluginGUI* createSampleSourcePluginGUI(const QString& sourceId, const QString& sourceSerial, int sourceSequence) { return 0; } }; Q_DECLARE_INTERFACE(PluginInterface, "de.maintech.SDRangelove.PluginInterface/0.1"); diff --git a/plugins/samplesource/airspy/airspyplugin.cpp b/plugins/samplesource/airspy/airspyplugin.cpp index 5651ffef8..fd3314553 100644 --- a/plugins/samplesource/airspy/airspyplugin.cpp +++ b/plugins/samplesource/airspy/airspyplugin.cpp @@ -91,11 +91,12 @@ PluginInterface::SampleSourceDevices AirspyPlugin::enumSampleSources() QString serial_str = QString::number(serial_msb, 16) + QString::number(serial_lsb, 16); uint64_t serial_num = (((uint64_t) serial_msb)<<32) + serial_lsb; QString displayedName(QString("Airspy #%1 0x%2").arg(i).arg(serial_str)); - SimpleSerializer s(1); - s.writeS32(1, i); - s.writeString(2, serial_str); - s.writeU64(3, serial_num); - result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.airspy", s.final())); + + result.append(SampleSourceDevice(displayedName, + "org.osmocom.sdr.samplesource.airspy", + serial_str, + i)); + qDebug("AirspyPlugin::enumSampleSources: enumerated Airspy device #%d", i); } diff --git a/plugins/samplesource/bladerf/bladerfplugin.cpp b/plugins/samplesource/bladerf/bladerfplugin.cpp index 1f415c5a5..4db7faf81 100644 --- a/plugins/samplesource/bladerf/bladerfplugin.cpp +++ b/plugins/samplesource/bladerf/bladerfplugin.cpp @@ -58,10 +58,11 @@ PluginInterface::SampleSourceDevices BlderfPlugin::enumSampleSources() for(int i = 0; i < count; i++) { QString displayedName(QString("BladeRF #%1 %2 (%3,%4)").arg(devinfo[i].instance).arg(devinfo[i].serial).arg(devinfo[i].usb_bus).arg(devinfo[i].usb_addr)); - SimpleSerializer s(1); - s.writeS32(1, i); - s.writeString(2, devinfo[i].serial); - result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.bladerf", s.final())); + + result.append(SampleSourceDevice(displayedName, + "org.osmocom.sdr.samplesource.bladerf", + QString(devinfo[i].serial), + i)); } if (devinfo) diff --git a/plugins/samplesource/fcdpro/fcdproplugin.cpp b/plugins/samplesource/fcdpro/fcdproplugin.cpp index 4191b91b2..5100060d1 100644 --- a/plugins/samplesource/fcdpro/fcdproplugin.cpp +++ b/plugins/samplesource/fcdpro/fcdproplugin.cpp @@ -54,16 +54,18 @@ PluginInterface::SampleSourceDevices FCDProPlugin::enumSampleSources() { SampleSourceDevices result; - int i = 1; + int i = 0; struct hid_device_info *device_info = hid_enumerate(fcd_traits::vendorId, fcd_traits::productId); while (device_info != 0) { QString serialNumber = QString::fromWCharArray(device_info->serial_number); QString displayedName(QString("%1 #%2 %3").arg(fcd_traits::displayedName).arg(i).arg(serialNumber)); - SimpleSerializer s(1); - s.writeS32(1, 0); - result.append(SampleSourceDevice(displayedName, fcd_traits::interfaceIID, s.final())); + + result.append(SampleSourceDevice(displayedName, + fcd_traits::interfaceIID, + QString::null, + i)); device_info = device_info->next; i++; diff --git a/plugins/samplesource/fcdproplus/fcdproplusplugin.cpp b/plugins/samplesource/fcdproplus/fcdproplusplugin.cpp index 07e4cc5f0..a18675c62 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusplugin.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusplugin.cpp @@ -52,16 +52,18 @@ PluginInterface::SampleSourceDevices FCDProPlusPlugin::enumSampleSources() { SampleSourceDevices result; - int i = 1; + int i = 0; struct hid_device_info *device_info = hid_enumerate(fcd_traits::vendorId, fcd_traits::productId); while (device_info != 0) { QString serialNumber = QString::fromWCharArray(device_info->serial_number); QString displayedName(QString("%1 #%2 %3").arg(fcd_traits::displayedName).arg(i).arg(serialNumber)); - SimpleSerializer s(1); - s.writeS32(1, 0); - result.append(SampleSourceDevice(displayedName, fcd_traits::interfaceIID, s.final())); + + result.append(SampleSourceDevice(displayedName, + fcd_traits::interfaceIID, + QString::null, + i)); device_info = device_info->next; i++; diff --git a/plugins/samplesource/filesource/filesourceplugin.cpp b/plugins/samplesource/filesource/filesourceplugin.cpp index 71aa84ab9..493bbd1c5 100644 --- a/plugins/samplesource/filesource/filesourceplugin.cpp +++ b/plugins/samplesource/filesource/filesourceplugin.cpp @@ -59,7 +59,11 @@ PluginInterface::SampleSourceDevices FileSourcePlugin::enumSampleSources() SimpleSerializer s(1); s.writeS32(1, i); s.writeString(2, ""); - result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.filesource", s.final())); + + result.append(SampleSourceDevice(displayedName, + "org.osmocom.sdr.samplesource.filesource", + QString::null, + i)); } return result; diff --git a/plugins/samplesource/hackrf/hackrfplugin.cpp b/plugins/samplesource/hackrf/hackrfplugin.cpp index 42a0e6c50..e4abddeed 100644 --- a/plugins/samplesource/hackrf/hackrfplugin.cpp +++ b/plugins/samplesource/hackrf/hackrfplugin.cpp @@ -98,7 +98,11 @@ PluginInterface::SampleSourceDevices HackRFPlugin::enumSampleSources() s.writeS32(1, i); s.writeString(2, serial_str); s.writeU64(3, serial_num); - result.append(SampleSourceDevice(displayedName, m_deviceTypeID, s.final())); + + result.append(SampleSourceDevice(displayedName, m_deviceTypeID, + serial_str, + i)); + qDebug("HackRFPlugin::enumSampleSources: enumerated HackRF device #%d", i); hackrf_close(hackrf_ptr); diff --git a/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp b/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp index d5ad099f9..62fe77508 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrplugin.cpp @@ -48,9 +48,11 @@ PluginInterface::SampleSourceDevices RTLSDRPlugin::enumSampleSources() if(rtlsdr_get_device_usb_strings((uint32_t)i, vendor, product, serial) != 0) continue; QString displayedName(QString("RTL-SDR #%1 (%2 #%3)").arg(i + 1).arg(product).arg(serial)); - SimpleSerializer s(1); - s.writeS32(1, i); - result.append(SampleSourceDevice(displayedName, "org.osmocom.sdr.samplesource.rtl-sdr", s.final())); + + result.append(SampleSourceDevice(displayedName, + "org.osmocom.sdr.samplesource.rtl-sdr", + QString(serial), + i)); } return result; } diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index e0c6c0672..eb060cc44 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -115,7 +115,7 @@ MainWindow::MainWindow(QWidget* parent) : qDebug() << "MainWindow::MainWindow: select SampleSource from settings..."; - int sampleSourceIndex = m_pluginManager->selectSampleSource(m_settings.getCurrent()->getSource()); // select SampleSource from settings + int sampleSourceIndex = m_pluginManager->selectFirstSampleSource(m_settings.getCurrent()->getSourceId()); // select SampleSource from settings if(sampleSourceIndex >= 0) { @@ -208,7 +208,7 @@ void MainWindow::loadSettings() void MainWindow::loadPresetSettings(const Preset* preset) { - qDebug() << "MainWindow::loadPresetSettings: preset: " << preset->getSource().toStdString().c_str(); + qDebug() << "MainWindow::loadPresetSettings: preset: " << preset->getSourceId().toStdString().c_str(); ui->glSpectrumGUI->deserialize(preset->getSpectrumConfig()); @@ -229,7 +229,7 @@ void MainWindow::saveSettings() void MainWindow::savePresetSettings(Preset* preset) { - qDebug() << "MainWindow::savePresetSettings: preset: " << preset->getSource().toStdString().c_str(); + qDebug() << "MainWindow::savePresetSettings: preset: " << preset->getSourceId().toStdString().c_str(); preset->setSpectrumConfig(ui->glSpectrumGUI->serialize()); preset->clearChannels(); diff --git a/sdrbase/plugin/pluginmanager.cpp b/sdrbase/plugin/pluginmanager.cpp index d33088d36..29ff14ef0 100644 --- a/sdrbase/plugin/pluginmanager.cpp +++ b/sdrbase/plugin/pluginmanager.cpp @@ -16,7 +16,7 @@ PluginManager::PluginManager(MainWindow* mainWindow, DSPEngine* dspEngine, QObje m_pluginAPI(this, mainWindow, dspEngine), m_mainWindow(mainWindow), m_dspEngine(dspEngine), - m_sampleSourceName(), + m_sampleSourceId(), m_sampleSourcePluginGUI(NULL) { } @@ -142,12 +142,12 @@ void PluginManager::loadSettings(const Preset* preset) if(m_sampleSourcePluginGUI != 0) { - qDebug("PluginManager::loadSettings: source compare [%s] vs [%s]", qPrintable(m_sampleSourceName), qPrintable(preset->getSource())); + qDebug("PluginManager::loadSettings: source compare [%s] vs [%s]", qPrintable(m_sampleSourceId), qPrintable(preset->getSourceId())); // TODO: have one set of source presets per identified source (preset -> find source with name) - if(m_sampleSourceName == preset->getSource()) + if(m_sampleSourceId == preset->getSourceId()) { - qDebug() << "PluginManager::loadSettings: deserializing source " << qPrintable(m_sampleSourceName); + qDebug() << "PluginManager::loadSettings: deserializing source " << qPrintable(m_sampleSourceId); m_sampleSourcePluginGUI->deserialize(preset->getSourceConfig()); } @@ -174,12 +174,12 @@ void PluginManager::saveSettings(Preset* preset) { if(m_sampleSourcePluginGUI != NULL) { - preset->setSourceConfig(m_sampleSourceName, m_sampleSourcePluginGUI->serialize()); + preset->setSourceConfig(m_sampleSourceId, m_sampleSourceSerial, m_sampleSourceSequence, m_sampleSourcePluginGUI->serialize()); preset->setCenterFrequency(m_sampleSourcePluginGUI->getCenterFrequency()); } else { - preset->setSourceConfig(QString::null, QByteArray()); + preset->setSourceConfig(QString::null, QString::null, 0, QByteArray()); } qSort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type @@ -203,7 +203,7 @@ void PluginManager::freeAll() m_dspEngine->setSource(NULL); m_sampleSourcePluginGUI->destroy(); m_sampleSourcePluginGUI = NULL; - m_sampleSourceName.clear(); + m_sampleSourceId.clear(); } } @@ -237,10 +237,19 @@ bool PluginManager::handleMessage(const Message& message) void PluginManager::updateSampleSourceDevices() { m_sampleSourceDevices.clear(); - for(int i = 0; i < m_sampleSourceRegistrations.count(); ++i) { + + for(int i = 0; i < m_sampleSourceRegistrations.count(); ++i) + { PluginInterface::SampleSourceDevices ssd = m_sampleSourceRegistrations[i].m_plugin->enumSampleSources(); + for(int j = 0; j < ssd.count(); ++j) - m_sampleSourceDevices.append(SampleSourceDevice(m_sampleSourceRegistrations[i].m_plugin, ssd[j].displayedName, ssd[j].name, ssd[j].address)); + { + m_sampleSourceDevices.append(SampleSourceDevice(m_sampleSourceRegistrations[i].m_plugin, + ssd[j].displayedName, + ssd[j].id, + ssd[j].serial, + ssd[j].sequence)); + } } } @@ -262,35 +271,56 @@ int PluginManager::selectSampleSource(int index) m_dspEngine->setSource(NULL); m_sampleSourcePluginGUI->destroy(); m_sampleSourcePluginGUI = NULL; - m_sampleSourceName.clear(); + m_sampleSourceId.clear(); } - if(index == -1) { - if(!m_sampleSourceName.isEmpty()) { - for(int i = 0; i < m_sampleSourceDevices.count(); i++) { - if(m_sampleSourceDevices[i].m_sourceName == m_sampleSourceName) { + if(index == -1) + { + if(!m_sampleSourceId.isEmpty()) + { + for(int i = 0; i < m_sampleSourceDevices.count(); i++) + { + if(m_sampleSourceDevices[i].m_sourceId == m_sampleSourceId) + { index = i; break; } } } - if(index == -1) { + + if(index == -1) + { if(m_sampleSourceDevices.count() > 0) + { index = 0; + } } } - if(index == -1) - return -1; - m_sampleSourceName = m_sampleSourceDevices[index].m_sourceName; - qDebug() << "m_sampleSource at index " << index << " is " << m_sampleSourceName.toStdString().c_str(); - m_sampleSourcePluginGUI = m_sampleSourceDevices[index].m_plugin->createSampleSourcePluginGUI(m_sampleSourceName, m_sampleSourceDevices[index].m_address); + if(index == -1) + { + return -1; + } + + m_sampleSourceId = m_sampleSourceDevices[index].m_sourceId; + m_sampleSourceSerial = m_sampleSourceDevices[index].m_sourceSerial; + m_sampleSourceSequence = m_sampleSourceDevices[index].m_sourceSequence; + + qDebug() << "m_sampleSource at index " << index + << " id: " << m_sampleSourceId.toStdString().c_str() + << " ser: " << m_sampleSourceSerial.toStdString().c_str() + << " seq: " << m_sampleSourceSequence; + + m_sampleSourcePluginGUI = m_sampleSourceDevices[index].m_plugin->createSampleSourcePluginGUI(m_sampleSourceId, + m_sampleSourceSerial, + m_sampleSourceSequence); + return index; } -int PluginManager::selectSampleSource(const QString& source) +int PluginManager::selectFirstSampleSource(const QString& sourceId) { - qDebug() << "PluginManager::selectSampleSource by name: " << source.toStdString().c_str(); + qDebug() << "PluginManager::selectFirstSampleSource by id: " << sourceId.toStdString().c_str(); int index = -1; @@ -301,27 +331,48 @@ int PluginManager::selectSampleSource(const QString& source) m_dspEngine->setSource(NULL); m_sampleSourcePluginGUI->destroy(); m_sampleSourcePluginGUI = NULL; - m_sampleSourceName.clear(); + m_sampleSourceId.clear(); } - qDebug("finding sample source [%s]", qPrintable(source)); - for(int i = 0; i < m_sampleSourceDevices.count(); i++) { - qDebug("*** %s vs %s", qPrintable(m_sampleSourceDevices[i].m_sourceName), qPrintable(source)); - if(m_sampleSourceDevices[i].m_sourceName == source) { + qDebug("finding first sample source [%s]", qPrintable(sourceId)); + + for(int i = 0; i < m_sampleSourceDevices.count(); i++) + { + qDebug("*** %s vs %s", qPrintable(m_sampleSourceDevices[i].m_sourceId), qPrintable(sourceId)); + + if(m_sampleSourceDevices[i].m_sourceId == sourceId) + { index = i; break; } } - if(index == -1) { - if(m_sampleSourceDevices.count() > 0) - index = 0; - } - if(index == -1) - return -1; - m_sampleSourceName = m_sampleSourceDevices[index].m_sourceName; - qDebug() << "m_sampleSource at index " << index << " is " << m_sampleSourceName.toStdString().c_str(); - m_sampleSourcePluginGUI = m_sampleSourceDevices[index].m_plugin->createSampleSourcePluginGUI(m_sampleSourceName, m_sampleSourceDevices[index].m_address); + if(index == -1) + { + if(m_sampleSourceDevices.count() > 0) + { + index = 0; + } + } + + if(index == -1) + { + return -1; + } + + m_sampleSourceId = m_sampleSourceDevices[index].m_sourceId; + m_sampleSourceSerial = m_sampleSourceDevices[index].m_sourceSerial; + m_sampleSourceSequence = m_sampleSourceDevices[index].m_sourceSequence; + + qDebug() << "m_sampleSource at index " << index + << " id: " << m_sampleSourceId.toStdString().c_str() + << " ser: " << m_sampleSourceSerial.toStdString().c_str() + << " seq: " << m_sampleSourceSequence; + + m_sampleSourcePluginGUI = m_sampleSourceDevices[index].m_plugin->createSampleSourcePluginGUI(m_sampleSourceId, + m_sampleSourceSerial, + m_sampleSourceSequence); + return index; } diff --git a/sdrbase/settings/preset.cpp b/sdrbase/settings/preset.cpp index f0dbce66a..dbe76ef71 100644 --- a/sdrbase/settings/preset.cpp +++ b/sdrbase/settings/preset.cpp @@ -17,13 +17,13 @@ void Preset::resetToDefaults() m_layout.clear(); m_spectrumConfig.clear(); m_channelConfigs.clear(); - m_source.clear(); + m_sourceId.clear(); m_sourceConfig.clear(); } QByteArray Preset::serialize() const { - qDebug() << "Preset::serialize (" << this->getSource().toStdString().c_str() << ")"; + qDebug() << "Preset::serialize (" << this->getSourceId().toStdString().c_str() << ")"; SimpleSerializer s(1); s.writeString(1, m_group); @@ -31,7 +31,7 @@ QByteArray Preset::serialize() const s.writeU64(3, m_centerFrequency); s.writeBlob(4, m_layout); s.writeBlob(5, m_spectrumConfig); - s.writeString(6, m_source); + s.writeString(6, m_sourceId); s.writeBlob(7, m_sourceConfig); s.writeS32(200, m_channelConfigs.size()); @@ -48,7 +48,7 @@ QByteArray Preset::serialize() const bool Preset::deserialize(const QByteArray& data) { - qDebug() << "Preset::deserialize (" << this->getSource().toStdString().c_str() << ")"; + qDebug() << "Preset::deserialize (" << this->getSourceId().toStdString().c_str() << ")"; SimpleDeserializer d(data); if(!d.isValid()) { @@ -62,7 +62,7 @@ bool Preset::deserialize(const QByteArray& data) d.readU64(3, &m_centerFrequency, 0); d.readBlob(4, &m_layout); d.readBlob(5, &m_spectrumConfig); - d.readString(6, &m_source); + d.readString(6, &m_sourceId); d.readBlob(7, &m_sourceConfig); qDebug() << "Preset::deserialize: m_group: " << m_group.toStdString().c_str();