diff --git a/plugins/samplesource/bladerf/bladerfgui.cpp b/plugins/samplesource/bladerf/bladerfgui.cpp index a52233a71..fe8994fb3 100644 --- a/plugins/samplesource/bladerf/bladerfgui.cpp +++ b/plugins/samplesource/bladerf/bladerfgui.cpp @@ -179,13 +179,13 @@ void BladerfGui::on_decim_valueChanged(int value) void BladerfGui::on_fcPos_currentIndexChanged(int index) { if (index == 0) { - m_settings.m_fcPos = BladerfInput::FC_POS_INFRA; + m_settings.m_fcPos = BladeRFSettings::FC_POS_INFRA; sendSettings(); } else if (index == 1) { - m_settings.m_fcPos = BladerfInput::FC_POS_SUPRA; + m_settings.m_fcPos = BladeRFSettings::FC_POS_SUPRA; sendSettings(); } else if (index == 2) { - m_settings.m_fcPos = BladerfInput::FC_POS_CENTER; + m_settings.m_fcPos = BladeRFSettings::FC_POS_CENTER; sendSettings(); } } diff --git a/plugins/samplesource/bladerf/bladerfsettings.cpp b/plugins/samplesource/bladerf/bladerfsettings.cpp index ea918c7a7..27472e563 100644 --- a/plugins/samplesource/bladerf/bladerfsettings.cpp +++ b/plugins/samplesource/bladerf/bladerfsettings.cpp @@ -49,7 +49,7 @@ QByteArray BladeRFSettings::serialize() const s.writeS32(3, m_vga1); s.writeS32(4, m_vga2); s.writeS32(5, m_bandwidth); - s.writeS32(6, m_log2Decim); + s.writeU32(6, m_log2Decim); s.writeS32(7, (int) m_fcPos); s.writeBool(8, m_xb200); s.writeS32(9, (int) m_xb200Path); @@ -70,7 +70,7 @@ bool BladeRFSettings::deserialize(const QByteArray& data) return false; } - if (d.getVersion() == SampleSourceSerializer::getSerializerVersion()) + if (d.getVersion() == 1) { int intval; @@ -79,7 +79,7 @@ bool BladeRFSettings::deserialize(const QByteArray& data) d.readS32(3, &m_vga1); d.readS32(4, &m_vga2); d.readS32(5, &m_bandwidth); - d.readS32(6, &m_log2Decim); + d.readU32(6, &m_log2Decim); d.readS32(7, &intval); m_fcPos = (fcPos_t) intval; d.readBool(8, &m_xb200); diff --git a/plugins/samplesource/bladerf/bladerfsettings.h b/plugins/samplesource/bladerf/bladerfsettings.h index 2224ea2e5..969eab0cd 100644 --- a/plugins/samplesource/bladerf/bladerfsettings.h +++ b/plugins/samplesource/bladerf/bladerfsettings.h @@ -17,6 +17,8 @@ #ifndef _BLADERF_BLADERFSETTINGS_H_ #define _BLADERF_BLADERFSETTINGS_H_ +#include + struct BladeRFSettings { typedef enum { FC_POS_INFRA = 0,