gr-osmosdr: unbreak
This commit is contained in:
parent
60f4470376
commit
664d43351c
|
@ -106,7 +106,7 @@ bool GNURadioGui::deserialize(const QByteArray& data)
|
||||||
|
|
||||||
bool GNURadioGui::handleMessage(Message* message)
|
bool GNURadioGui::handleMessage(Message* message)
|
||||||
{
|
{
|
||||||
if(message->id() == GNURadioInput::MsgReportGNURadio::ID()) {
|
if(GNURadioInput::MsgReportGNURadio::match(message)) {
|
||||||
GNURadioInput::MsgReportGNURadio* rep = (GNURadioInput::MsgReportGNURadio*)message;
|
GNURadioInput::MsgReportGNURadio* rep = (GNURadioInput::MsgReportGNURadio*)message;
|
||||||
m_namedGains = rep->getNamedGains();
|
m_namedGains = rep->getNamedGains();
|
||||||
m_freqMin = rep->getFreqMin();
|
m_freqMin = rep->getFreqMin();
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include "gnuradiothread.h"
|
#include "gnuradiothread.h"
|
||||||
#include "gnuradiogui.h"
|
#include "gnuradiogui.h"
|
||||||
|
|
||||||
MessageRegistrator GNURadioInput::MsgConfigureGNURadio::ID("MsgConfigureGNURadio");
|
MESSAGE_CLASS_DEFINITION(GNURadioInput::MsgConfigureGNURadio, Message)
|
||||||
MessageRegistrator GNURadioInput::MsgReportGNURadio::ID("MsgReportGNURadio");
|
MESSAGE_CLASS_DEFINITION(GNURadioInput::MsgReportGNURadio, Message)
|
||||||
|
|
||||||
GNURadioInput::Settings::Settings() :
|
GNURadioInput::Settings::Settings() :
|
||||||
m_args(""),
|
m_args(""),
|
||||||
|
@ -135,7 +135,7 @@ bool GNURadioInput::startInput(int device)
|
||||||
freqMin = freq_rage.start();
|
freqMin = freq_rage.start();
|
||||||
freqMax = freq_rage.stop();
|
freqMax = freq_rage.stop();
|
||||||
} catch ( std::exception &ex ) {
|
} catch ( std::exception &ex ) {
|
||||||
qDebug(ex.what());
|
qDebug("%s", ex.what());
|
||||||
}
|
}
|
||||||
|
|
||||||
freqCorr = radio->get_freq_corr();
|
freqCorr = radio->get_freq_corr();
|
||||||
|
@ -160,14 +160,14 @@ bool GNURadioInput::startInput(int device)
|
||||||
|
|
||||||
m_settings.m_namedGains.push_back( pair2 );
|
m_settings.m_namedGains.push_back( pair2 );
|
||||||
} catch ( std::exception &ex ) {
|
} catch ( std::exception &ex ) {
|
||||||
qDebug(ex.what());
|
qDebug("%s", ex.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
sampRates = radio->get_sample_rates().values();
|
sampRates = radio->get_sample_rates().values();
|
||||||
} catch ( std::exception &ex ) {
|
} catch ( std::exception &ex ) {
|
||||||
qDebug(ex.what());
|
qDebug("%s", ex.what());
|
||||||
}
|
}
|
||||||
|
|
||||||
antennas.clear();
|
antennas.clear();
|
||||||
|
@ -188,7 +188,7 @@ bool GNURadioInput::startInput(int device)
|
||||||
try {
|
try {
|
||||||
bandwidths = radio->get_bandwidth_range().values();
|
bandwidths = radio->get_bandwidth_range().values();
|
||||||
} catch ( std::exception &ex ) {
|
} catch ( std::exception &ex ) {
|
||||||
qDebug(ex.what());
|
qDebug("%s", ex.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ quint64 GNURadioInput::getCenterFrequency() const
|
||||||
|
|
||||||
bool GNURadioInput::handleMessage(Message* message)
|
bool GNURadioInput::handleMessage(Message* message)
|
||||||
{
|
{
|
||||||
if(message->id() == MsgConfigureGNURadio::ID()) {
|
if(MsgConfigureGNURadio::match(message)) {
|
||||||
MsgConfigureGNURadio* conf = (MsgConfigureGNURadio*)message;
|
MsgConfigureGNURadio* conf = (MsgConfigureGNURadio*)message;
|
||||||
if(!applySettings(conf->getGeneralSettings(), conf->getSettings(), false))
|
if(!applySettings(conf->getGeneralSettings(), conf->getSettings(), false))
|
||||||
qDebug("Gnuradio config error");
|
qDebug("Gnuradio config error");
|
||||||
|
@ -324,7 +324,7 @@ bool GNURadioInput::applySettings(const GeneralSettings& generalSettings,
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch ( std::exception &ex ) {
|
} catch ( std::exception &ex ) {
|
||||||
qDebug(ex.what());
|
qDebug("%s", ex.what());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,9 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
class MsgConfigureGNURadio : public Message {
|
class MsgConfigureGNURadio : public Message {
|
||||||
public:
|
MESSAGE_CLASS_DECLARATION
|
||||||
static MessageRegistrator ID;
|
|
||||||
|
|
||||||
|
public:
|
||||||
const GeneralSettings& getGeneralSettings() const { return m_generalSettings; }
|
const GeneralSettings& getGeneralSettings() const { return m_generalSettings; }
|
||||||
const Settings& getSettings() const { return m_settings; }
|
const Settings& getSettings() const { return m_settings; }
|
||||||
|
|
||||||
|
@ -62,16 +62,16 @@ public:
|
||||||
Settings m_settings;
|
Settings m_settings;
|
||||||
|
|
||||||
MsgConfigureGNURadio(const GeneralSettings& generalSettings, const Settings& settings) :
|
MsgConfigureGNURadio(const GeneralSettings& generalSettings, const Settings& settings) :
|
||||||
Message(ID()),
|
Message(),
|
||||||
m_generalSettings(generalSettings),
|
m_generalSettings(generalSettings),
|
||||||
m_settings(settings)
|
m_settings(settings)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MsgReportGNURadio : public Message {
|
class MsgReportGNURadio : public Message {
|
||||||
public:
|
MESSAGE_CLASS_DECLARATION
|
||||||
static MessageRegistrator ID;
|
|
||||||
|
|
||||||
|
public:
|
||||||
const std::vector< std::pair< QString, std::vector<double> > >& getNamedGains() const { return m_namedGains; }
|
const std::vector< std::pair< QString, std::vector<double> > >& getNamedGains() const { return m_namedGains; }
|
||||||
const double getFreqMin() const { return m_freqMin; }
|
const double getFreqMin() const { return m_freqMin; }
|
||||||
const double getFreqMax() const { return m_freqMax; }
|
const double getFreqMax() const { return m_freqMax; }
|
||||||
|
@ -115,7 +115,7 @@ public:
|
||||||
const std::vector<QString>& dcoffs,
|
const std::vector<QString>& dcoffs,
|
||||||
const std::vector<QString>& iqbals,
|
const std::vector<QString>& iqbals,
|
||||||
const std::vector<double>& bandwidths) :
|
const std::vector<double>& bandwidths) :
|
||||||
Message(ID()),
|
Message(),
|
||||||
m_freqMin(freqMin),
|
m_freqMin(freqMin),
|
||||||
m_freqMax(freqMax),
|
m_freqMax(freqMax),
|
||||||
m_freqCorr(freqCorr),
|
m_freqCorr(freqCorr),
|
||||||
|
|
Loading…
Reference in New Issue