pull/6/head
hexameron 2014-11-23 09:22:02 +00:00
rodzic 0ada023270
commit 1964946afe
4 zmienionych plików z 17 dodań i 15 usunięć

Wyświetl plik

@ -7,3 +7,5 @@ For Ubuntu:
Use "cmake ../ -DKERNEL=ON" to build the Linux kernel driver (Experimental). Needs a recent kernel and libv4l2. Will need extra work to support Airspy and Hackrf.
The Gnuradio plugin source needs extra packages, including "liblog4cpp-dev libboost-system-dev gnuradio-dev libosmosdr-dev"

Wyświetl plik

@ -137,7 +137,7 @@ void GNURadioGui::displaySettings()
osmosdr::devices_t devices = osmosdr::device::find();
for ( int i = 0; i < devices.size(); i++ )
for ( uint i = 0; i < devices.size(); i++ )
{
osmosdr::device_t dev = devices[i];
@ -199,7 +199,7 @@ void GNURadioGui::displaySettings()
delete layout;
}
for ( int i = 0; i < m_namedGains.size(); i++ )
for ( uint i = 0; i < m_namedGains.size(); i++ )
{
std::pair< QString, std::vector<double> > pair = m_namedGains[i];
@ -236,7 +236,7 @@ void GNURadioGui::displaySettings()
oldIndex = ui->cboSampleRate->currentIndex();
ui->cboSampleRate->clear();
for ( int i = 0; i < m_sampRates.size(); i++ )
for ( uint i = 0; i < m_sampRates.size(); i++ )
ui->cboSampleRate->addItem( QString::number(m_sampRates[i] / 1e6) );
if ( oldIndex > ui->cboSampleRate->count() - 1 )
@ -255,7 +255,7 @@ void GNURadioGui::displaySettings()
ui->cboAntennas->clear();
if ( m_antennas.size() ) {
for ( int i = 0; i < m_antennas.size(); i++ )
for ( uint i = 0; i < m_antennas.size(); i++ )
ui->cboAntennas->addItem( m_antennas[i] );
if ( oldIndex > ui->cboAntennas->count() - 1 )
@ -273,7 +273,7 @@ void GNURadioGui::displaySettings()
ui->cboDCOffset->clear();
if ( m_dcoffs.size() ) {
for ( int i = 0; i < m_dcoffs.size(); i++ )
for ( uint i = 0; i < m_dcoffs.size(); i++ )
ui->cboDCOffset->addItem( m_dcoffs[i] );
if ( ui->cboDCOffset->count() && oldIndex >= 0 )
@ -288,7 +288,7 @@ void GNURadioGui::displaySettings()
ui->cboIQBalance->clear();
if ( m_iqbals.size() ) {
for ( int i = 0; i < m_iqbals.size(); i++ )
for ( uint i = 0; i < m_iqbals.size(); i++ )
ui->cboIQBalance->addItem( m_iqbals[i] );
if ( ui->cboIQBalance->count() && oldIndex >= 0 )
@ -302,7 +302,7 @@ void GNURadioGui::displaySettings()
oldIndex = ui->cboBandwidth->currentIndex();
ui->cboBandwidth->clear();
for ( int i = 0; i < m_bandwidths.size(); i++ )
for ( uint i = 0; i < m_bandwidths.size(); i++ )
if ( 0.0 == m_bandwidths[i] )
ui->cboBandwidth->addItem( "Auto" );
else
@ -387,7 +387,7 @@ void GNURadioGui::on_sldGain_valueChanged(int value)
void GNURadioGui::on_cboSampleRate_currentIndexChanged(int index)
{
if ( index < 0 || index >= m_sampRates.size() )
if ( index < 0 || (uint)index >= m_sampRates.size() )
return;
m_settings.m_sampRate = m_sampRates[index];
@ -414,7 +414,7 @@ void GNURadioGui::on_cboIQBalance_currentIndexChanged(const QString &arg1)
void GNURadioGui::on_cboBandwidth_currentIndexChanged(int index)
{
if ( index < 0 || index >= m_bandwidths.size() )
if ( index < 0 || (uint)index >= m_bandwidths.size() )
return;
m_settings.m_bandwidth = m_bandwidths[index];

Wyświetl plik

@ -55,7 +55,6 @@ public:
private:
Ui::GNURadioGui* ui;
PluginAPI* m_pluginAPI;
SampleSource* m_sampleSource;
QList< QPair<QString, QString> > m_devs;
std::vector< std::pair< QString, std::vector<double> > > m_namedGains;
double m_freqMin;
@ -72,8 +71,9 @@ private:
QList< QPair< QSlider*, QLabel* > > m_gainControls;
SampleSource::GeneralSettings m_generalSettings;
GNURadioInput::Settings m_settings;
SampleSource* m_sampleSource;
SampleSource::GeneralSettings m_generalSettings;
QTimer m_updateTimer;
void displaySettings();

Wyświetl plik

@ -143,7 +143,7 @@ bool GNURadioInput::startInput(int device)
namedGains.clear();
m_settings.m_namedGains.clear();
std::vector< std::string > gain_names = radio->get_gain_names();
for ( int i = 0; i < gain_names.size(); i++ )
for ( uint i = 0; i < gain_names.size(); i++ )
{
std::string gain_name = gain_names[i];
@ -172,7 +172,7 @@ bool GNURadioInput::startInput(int device)
antennas.clear();
std::vector< std::string > ant = radio->get_antennas();
for ( int i = 0; i < ant.size(); i++ )
for ( uint i = 0; i < ant.size(); i++ )
antennas.push_back( QString( ant[i].c_str() ) );
m_dcoffs.clear();
@ -292,7 +292,7 @@ bool GNURadioInput::applySettings(const GeneralSettings& generalSettings,
if((m_settings.m_dcoff != settings.m_dcoff) || force) {
m_settings.m_dcoff = settings.m_dcoff;
for ( int i = 0; i < m_dcoffs.size(); i++ )
for ( uint i = 0; i < m_dcoffs.size(); i++ )
{
if ( m_dcoffs[i] != m_settings.m_dcoff )
continue;
@ -305,7 +305,7 @@ bool GNURadioInput::applySettings(const GeneralSettings& generalSettings,
if((m_settings.m_iqbal != settings.m_iqbal) || force) {
m_settings.m_iqbal = settings.m_iqbal;
for ( int i = 0; i < m_iqbals.size(); i++ )
for ( uint i = 0; i < m_iqbals.size(); i++ )
{
if ( m_iqbals[i] != m_settings.m_iqbal )
continue;