mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-01 01:06:35 -04:00
Fixed some warnings from Mac ports compilation
This commit is contained in:
parent
98925cce82
commit
b64d813cfc
@ -153,11 +153,11 @@ void ATVDemodGUI::displayStreamIndex()
|
|||||||
void ATVDemodGUI::displayRFBandwidths()
|
void ATVDemodGUI::displayRFBandwidths()
|
||||||
{
|
{
|
||||||
int sliderPosition = m_settings.m_fftBandwidth / m_rfSliderDivisor;
|
int sliderPosition = m_settings.m_fftBandwidth / m_rfSliderDivisor;
|
||||||
sliderPosition < 1 ? 1 : sliderPosition > 100 ? 100 : sliderPosition;
|
sliderPosition = sliderPosition < 1 ? 1 : sliderPosition > 100 ? 100 : sliderPosition;
|
||||||
ui->rfBW->setValue(sliderPosition);
|
ui->rfBW->setValue(sliderPosition);
|
||||||
ui->rfBWText->setText(QString("%1k").arg((sliderPosition * m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
|
ui->rfBWText->setText(QString("%1k").arg((sliderPosition * m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
|
||||||
sliderPosition = m_settings.m_fftOppBandwidth / m_rfSliderDivisor;
|
sliderPosition = m_settings.m_fftOppBandwidth / m_rfSliderDivisor;
|
||||||
sliderPosition < 0 ? 0 : sliderPosition > 100 ? 100 : sliderPosition;
|
sliderPosition = sliderPosition < 0 ? 0 : sliderPosition > 100 ? 100 : sliderPosition;
|
||||||
ui->rfOppBW->setValue(sliderPosition);
|
ui->rfOppBW->setValue(sliderPosition);
|
||||||
ui->rfOppBWText->setText(QString("%1k").arg((sliderPosition * m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
|
ui->rfOppBWText->setText(QString("%1k").arg((sliderPosition * m_rfSliderDivisor) / 1000.0, 0, 'f', 0));
|
||||||
}
|
}
|
||||||
|
@ -151,11 +151,11 @@ struct bch_engine : bch_interface
|
|||||||
if (2 * L <= n)
|
if (2 * L <= n)
|
||||||
{
|
{
|
||||||
TGF *tmp = new TGF[NN]; // replaced crap code
|
TGF *tmp = new TGF[NN]; // replaced crap code
|
||||||
memcpy(tmp, C, sizeof(tmp));
|
std::copy(C, C+NN, tmp); //memcpy(tmp, C, sizeof(tmp));
|
||||||
for (int i = 0; i < NN - m; ++i)
|
for (int i = 0; i < NN - m; ++i)
|
||||||
C[m + i] = GF.sub(C[m + i], GF.mul(d_div_b, B[i]));
|
C[m + i] = GF.sub(C[m + i], GF.mul(d_div_b, B[i]));
|
||||||
L = n + 1 - L;
|
L = n + 1 - L;
|
||||||
memcpy(B, tmp, sizeof(B));
|
std::copy(tmp, tmp+NN, B); //memcpy(B, tmp, sizeof(B));
|
||||||
b = d;
|
b = d;
|
||||||
m = 1;
|
m = 1;
|
||||||
delete[] tmp;
|
delete[] tmp;
|
||||||
|
@ -231,7 +231,7 @@ struct gf2n
|
|||||||
lut_exp[((1 << N) - 1) + i] = alpha_i; // Wrap to avoid modulo 2^N-1
|
lut_exp[((1 << N) - 1) + i] = alpha_i; // Wrap to avoid modulo 2^N-1
|
||||||
lut_log[alpha_i] = i;
|
lut_log[alpha_i] = i;
|
||||||
bool overflow = alpha_i & (1 << (N - 1));
|
bool overflow = alpha_i & (1 << (N - 1));
|
||||||
alpha_i <<= 1; // Multiply by alpha=[X] i.e. increase degrees
|
alpha_i *= 2; // Multiply by alpha=[X] i.e. increase degrees
|
||||||
alpha_i &= ~((~(Te)0) << N); // In case Te is wider than N bits
|
alpha_i &= ~((~(Te)0) << N); // In case Te is wider than N bits
|
||||||
if (overflow)
|
if (overflow)
|
||||||
alpha_i ^= TRUNCP; // Modulo P iteratively
|
alpha_i ^= TRUNCP; // Modulo P iteratively
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include "ssbdemodsink.h"
|
#include "ssbdemodsink.h"
|
||||||
|
|
||||||
const int SSBDemodSink::m_ssbFftLen = 1024;
|
const int SSBDemodSink::m_ssbFftLen = 1024;
|
||||||
const int SSBDemodSink::m_agcTarget = 3276.8; // -10 dB amplitude => -20 dB power: center of normal signal
|
const int SSBDemodSink::m_agcTarget = 3276; // 32768/10 -10 dB amplitude => -20 dB power: center of normal signal
|
||||||
|
|
||||||
SSBDemodSink::SSBDemodSink() :
|
SSBDemodSink::SSBDemodSink() :
|
||||||
m_audioBinaual(false),
|
m_audioBinaual(false),
|
||||||
|
@ -143,8 +143,6 @@ LocalSinkGUI::LocalSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
|
|||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
//connect(&(m_deviceUISet->m_deviceSourceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
//connect(&(m_deviceUISet->m_deviceSourceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
|
|
||||||
m_time.start();
|
|
||||||
|
|
||||||
updateLocalDevices();
|
updateLocalDevices();
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applySettings(true);
|
applySettings(true);
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QTime>
|
|
||||||
|
|
||||||
#include "plugin/plugininstancegui.h"
|
#include "plugin/plugininstancegui.h"
|
||||||
#include "dsp/channelmarker.h"
|
#include "dsp/channelmarker.h"
|
||||||
@ -69,7 +68,6 @@ private:
|
|||||||
LocalSink* m_localSink;
|
LocalSink* m_localSink;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
QTime m_time;
|
|
||||||
uint32_t m_tickCount;
|
uint32_t m_tickCount;
|
||||||
|
|
||||||
explicit LocalSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
explicit LocalSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||||
|
@ -143,8 +143,6 @@ RemoteSinkGUI::RemoteSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
|
|||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
//connect(&(m_deviceUISet->m_deviceSourceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
//connect(&(m_deviceUISet->m_deviceSourceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
|
|
||||||
m_time.start();
|
|
||||||
|
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applySettings(true);
|
applySettings(true);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QTime>
|
|
||||||
|
|
||||||
#include "plugin/plugininstancegui.h"
|
#include "plugin/plugininstancegui.h"
|
||||||
#include "dsp/channelmarker.h"
|
#include "dsp/channelmarker.h"
|
||||||
@ -70,7 +69,6 @@ private:
|
|||||||
RemoteSink* m_remoteSink;
|
RemoteSink* m_remoteSink;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
QTime m_time;
|
|
||||||
uint32_t m_tickCount;
|
uint32_t m_tickCount;
|
||||||
|
|
||||||
explicit RemoteSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
explicit RemoteSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||||
|
@ -230,8 +230,6 @@ FileSourceGUI::FileSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
|
|||||||
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
|
||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
|
|
||||||
m_time.start();
|
|
||||||
|
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applySettings(true);
|
applySettings(true);
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
#ifndef PLUGINS_CHANNELTX_FILESOURCE_FILESOURCEGUI_H_
|
#ifndef PLUGINS_CHANNELTX_FILESOURCE_FILESOURCEGUI_H_
|
||||||
#define PLUGINS_CHANNELTX_FILESOURCE_FILESOURCEGUI_H_
|
#define PLUGINS_CHANNELTX_FILESOURCE_FILESOURCEGUI_H_
|
||||||
|
|
||||||
#include <QTime>
|
|
||||||
|
|
||||||
#include "plugin/plugininstancegui.h"
|
#include "plugin/plugininstancegui.h"
|
||||||
#include "dsp/channelmarker.h"
|
#include "dsp/channelmarker.h"
|
||||||
#include "gui/rollupwidget.h"
|
#include "gui/rollupwidget.h"
|
||||||
@ -78,7 +76,6 @@ private:
|
|||||||
FileSource* m_fileSource;
|
FileSource* m_fileSource;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
QTime m_time;
|
|
||||||
uint32_t m_tickCount;
|
uint32_t m_tickCount;
|
||||||
|
|
||||||
explicit FileSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = nullptr);
|
explicit FileSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = nullptr);
|
||||||
|
@ -138,8 +138,6 @@ LocalSourceGUI::LocalSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
|
|||||||
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
|
||||||
//connect(&(m_deviceUISet->m_deviceSourceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
//connect(&(m_deviceUISet->m_deviceSourceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
|
|
||||||
m_time.start();
|
|
||||||
|
|
||||||
updateLocalDevices();
|
updateLocalDevices();
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applySettings(true);
|
applySettings(true);
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QTime>
|
|
||||||
|
|
||||||
#include "plugin/plugininstancegui.h"
|
#include "plugin/plugininstancegui.h"
|
||||||
#include "dsp/channelmarker.h"
|
#include "dsp/channelmarker.h"
|
||||||
@ -70,7 +69,6 @@ private:
|
|||||||
LocalSource* m_localSource;
|
LocalSource* m_localSource;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
QTime m_time;
|
|
||||||
uint32_t m_tickCount;
|
uint32_t m_tickCount;
|
||||||
|
|
||||||
explicit LocalSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel, QWidget* parent = 0);
|
explicit LocalSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel, QWidget* parent = 0);
|
||||||
|
@ -179,6 +179,8 @@ bool ATVModBaseband::handleMessage(const Message& cmd)
|
|||||||
MsgConfigureImageFileName& cfg = (MsgConfigureImageFileName&) cmd;
|
MsgConfigureImageFileName& cfg = (MsgConfigureImageFileName&) cmd;
|
||||||
qDebug() << "ATVModBaseband::handleMessage: MsgConfigureImageFileName: fileNaem: " << cfg.getFileName();
|
qDebug() << "ATVModBaseband::handleMessage: MsgConfigureImageFileName: fileNaem: " << cfg.getFileName();
|
||||||
m_source.openImage(cfg.getFileName());
|
m_source.openImage(cfg.getFileName());
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgConfigureVideoFileName::match(cmd))
|
else if (MsgConfigureVideoFileName::match(cmd))
|
||||||
{
|
{
|
||||||
@ -186,6 +188,8 @@ bool ATVModBaseband::handleMessage(const Message& cmd)
|
|||||||
MsgConfigureVideoFileName& cfg = (MsgConfigureVideoFileName&) cmd;
|
MsgConfigureVideoFileName& cfg = (MsgConfigureVideoFileName&) cmd;
|
||||||
qDebug() << "ATVModBaseband::handleMessage: MsgConfigureVideoFileName: fileName: " << cfg.getFileName();
|
qDebug() << "ATVModBaseband::handleMessage: MsgConfigureVideoFileName: fileName: " << cfg.getFileName();
|
||||||
m_source.openVideo( cfg.getFileName());
|
m_source.openVideo( cfg.getFileName());
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgConfigureVideoFileSourceSeek::match(cmd))
|
else if (MsgConfigureVideoFileSourceSeek::match(cmd))
|
||||||
{
|
{
|
||||||
@ -193,10 +197,13 @@ bool ATVModBaseband::handleMessage(const Message& cmd)
|
|||||||
MsgConfigureVideoFileSourceSeek& cfg = (MsgConfigureVideoFileSourceSeek&) cmd;
|
MsgConfigureVideoFileSourceSeek& cfg = (MsgConfigureVideoFileSourceSeek&) cmd;
|
||||||
qDebug() << "ATVModBaseband::handleMessage: MsgConfigureVideoFileName: precnetage: " << cfg.getPercentage();
|
qDebug() << "ATVModBaseband::handleMessage: MsgConfigureVideoFileName: precnetage: " << cfg.getPercentage();
|
||||||
m_source.seekVideoFileStream(cfg.getPercentage());
|
m_source.seekVideoFileStream(cfg.getPercentage());
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgConfigureVideoFileSourceStreamTiming::match(cmd))
|
else if (MsgConfigureVideoFileSourceStreamTiming::match(cmd))
|
||||||
{
|
{
|
||||||
m_source.reportVideoFileSourceStreamTiming();
|
m_source.reportVideoFileSourceStreamTiming();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgConfigureCameraIndex::match(cmd))
|
else if (MsgConfigureCameraIndex::match(cmd))
|
||||||
{
|
{
|
||||||
@ -204,12 +211,16 @@ bool ATVModBaseband::handleMessage(const Message& cmd)
|
|||||||
MsgConfigureCameraIndex& cfg = (MsgConfigureCameraIndex&) cmd;
|
MsgConfigureCameraIndex& cfg = (MsgConfigureCameraIndex&) cmd;
|
||||||
uint32_t index = cfg.getIndex() & 0x7FFFFFF;
|
uint32_t index = cfg.getIndex() & 0x7FFFFFF;
|
||||||
m_source.configureCameraIndex(index);
|
m_source.configureCameraIndex(index);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgConfigureCameraData::match(cmd))
|
else if (MsgConfigureCameraData::match(cmd))
|
||||||
{
|
{
|
||||||
QMutexLocker mutexLocker(&m_mutex);
|
QMutexLocker mutexLocker(&m_mutex);
|
||||||
MsgConfigureCameraData& cfg = (MsgConfigureCameraData&) cmd;
|
MsgConfigureCameraData& cfg = (MsgConfigureCameraData&) cmd;
|
||||||
m_source.configureCameraData(cfg.getIndex(), cfg.getManualFPS(), cfg.getManualFPSEnable());
|
m_source.configureCameraData(cfg.getIndex(), cfg.getManualFPS(), cfg.getManualFPSEnable());
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ void TestSinkPlugin::enumOriginDevices(QStringList& listedHwIds, OriginDevices&
|
|||||||
originDevices.append(OriginDevice(
|
originDevices.append(OriginDevice(
|
||||||
"TestSink",
|
"TestSink",
|
||||||
m_hardwareID,
|
m_hardwareID,
|
||||||
QString::null,
|
QString(),
|
||||||
0, // Sequence
|
0, // Sequence
|
||||||
0, // nb Rx
|
0, // nb Rx
|
||||||
1 // nb Tx
|
1 // nb Tx
|
||||||
|
@ -104,8 +104,6 @@ LocalInputGui::LocalInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
|||||||
m_networkManager = new QNetworkAccessManager();
|
m_networkManager = new QNetworkAccessManager();
|
||||||
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||||
|
|
||||||
m_eventsTime.start();
|
|
||||||
|
|
||||||
m_forceSettings = true;
|
m_forceSettings = true;
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,6 @@ private:
|
|||||||
|
|
||||||
uint32_t m_countUnrecoverable;
|
uint32_t m_countUnrecoverable;
|
||||||
uint32_t m_countRecovered;
|
uint32_t m_countRecovered;
|
||||||
QTime m_eventsTime;
|
|
||||||
|
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
bool m_forceSettings;
|
bool m_forceSettings;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#define INCLUDE_REMOTEINPUTGUI_H
|
#define INCLUDE_REMOTEINPUTGUI_H
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QElapsedTimer>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
|
|
||||||
@ -95,7 +96,7 @@ private:
|
|||||||
|
|
||||||
uint32_t m_countUnrecoverable;
|
uint32_t m_countUnrecoverable;
|
||||||
uint32_t m_countRecovered;
|
uint32_t m_countRecovered;
|
||||||
QTime m_eventsTime;
|
QElapsedTimer m_eventsTime;
|
||||||
|
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
bool m_forceSettings;
|
bool m_forceSettings;
|
||||||
|
@ -433,19 +433,19 @@ void DeviceAPI::getDeviceEngineStateStr(QString& state, int subsystemIndex)
|
|||||||
{
|
{
|
||||||
switch(m_deviceMIMOEngine->state(subsystemIndex))
|
switch(m_deviceMIMOEngine->state(subsystemIndex))
|
||||||
{
|
{
|
||||||
case DSPDeviceSinkEngine::StNotStarted:
|
case DSPDeviceMIMOEngine::StNotStarted:
|
||||||
state = "notStarted";
|
state = "notStarted";
|
||||||
break;
|
break;
|
||||||
case DSPDeviceSinkEngine::StIdle:
|
case DSPDeviceMIMOEngine::StIdle:
|
||||||
state = "idle";
|
state = "idle";
|
||||||
break;
|
break;
|
||||||
case DSPDeviceSinkEngine::StReady:
|
case DSPDeviceMIMOEngine::StReady:
|
||||||
state = "ready";
|
state = "ready";
|
||||||
break;
|
break;
|
||||||
case DSPDeviceSinkEngine::StRunning:
|
case DSPDeviceMIMOEngine::StRunning:
|
||||||
state = "running";
|
state = "running";
|
||||||
break;
|
break;
|
||||||
case DSPDeviceSinkEngine::StError:
|
case DSPDeviceMIMOEngine::StError:
|
||||||
state = "error";
|
state = "error";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1,4 +1,21 @@
|
|||||||
#include <QTime>
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copyright (C) 2015-2020 Edouard Griffiths, F4EXB //
|
||||||
|
// //
|
||||||
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
|
// it under the terms of the GNU General Public License as published by //
|
||||||
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
|
// (at your option) any later version. //
|
||||||
|
// //
|
||||||
|
// This program is distributed in the hope that it will be useful, //
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
|
// GNU General Public License V3 for more details. //
|
||||||
|
// //
|
||||||
|
// You should have received a copy of the GNU General Public License //
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include <QElapsedTimer>
|
||||||
#include "dsp/fftwengine.h"
|
#include "dsp/fftwengine.h"
|
||||||
|
|
||||||
FFTWEngine::FFTWEngine(const QString& fftWisdomFileName) :
|
FFTWEngine::FFTWEngine(const QString& fftWisdomFileName) :
|
||||||
@ -33,7 +50,7 @@ void FFTWEngine::configure(int n, bool inverse)
|
|||||||
m_currentPlan->inverse = inverse;
|
m_currentPlan->inverse = inverse;
|
||||||
m_currentPlan->in = (fftwf_complex*)fftwf_malloc(sizeof(fftwf_complex) * n);
|
m_currentPlan->in = (fftwf_complex*)fftwf_malloc(sizeof(fftwf_complex) * n);
|
||||||
m_currentPlan->out = (fftwf_complex*)fftwf_malloc(sizeof(fftwf_complex) * n);
|
m_currentPlan->out = (fftwf_complex*)fftwf_malloc(sizeof(fftwf_complex) * n);
|
||||||
QTime t;
|
QElapsedTimer t;
|
||||||
t.start();
|
t.start();
|
||||||
m_globalPlanMutex.lock();
|
m_globalPlanMutex.lock();
|
||||||
|
|
||||||
|
@ -1,3 +1,20 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copyright (C) 2015-2020 Edouard Griffiths, F4EXB //
|
||||||
|
// //
|
||||||
|
// This program is free software; you can redistribute it and/or modify //
|
||||||
|
// it under the terms of the GNU General Public License as published by //
|
||||||
|
// the Free Software Foundation as version 3 of the License, or //
|
||||||
|
// (at your option) any later version. //
|
||||||
|
// //
|
||||||
|
// This program is distributed in the hope that it will be useful, //
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||||
|
// GNU General Public License V3 for more details. //
|
||||||
|
// //
|
||||||
|
// You should have received a copy of the GNU General Public License //
|
||||||
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef INCLUDE_FFTWENGINE_H
|
#ifndef INCLUDE_FFTWENGINE_H
|
||||||
#define INCLUDE_FFTWENGINE_H
|
#define INCLUDE_FFTWENGINE_H
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <QTime>
|
#include <QElapsedTimer>
|
||||||
#include "dsp/dsptypes.h"
|
#include "dsp/dsptypes.h"
|
||||||
#include "export.h"
|
#include "export.h"
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ class SDRBASE_API SampleSinkFifo : public QObject {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QMutex m_mutex;
|
QMutex m_mutex;
|
||||||
QTime m_msgRateTimer;
|
QElapsedTimer m_msgRateTimer;
|
||||||
int m_suppressed;
|
int m_suppressed;
|
||||||
|
|
||||||
SampleVector m_data;
|
SampleVector m_data;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include <plugin/plugininstancegui.h>
|
#include <plugin/plugininstancegui.h>
|
||||||
#include "device/deviceenumerator.h"
|
#include "device/deviceenumerator.h"
|
||||||
@ -102,7 +103,7 @@ void PluginManager::loadPluginsPart(const QString& pluginsSubDir)
|
|||||||
|
|
||||||
void PluginManager::loadPluginsFinal()
|
void PluginManager::loadPluginsFinal()
|
||||||
{
|
{
|
||||||
qSort(m_plugins);
|
std::sort(m_plugins.begin(), m_plugins.end());
|
||||||
|
|
||||||
for (Plugins::const_iterator it = m_plugins.begin(); it != m_plugins.end(); ++it)
|
for (Plugins::const_iterator it = m_plugins.begin(); it != m_plugins.end(); ++it)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "settings/mainsettings.h"
|
#include "settings/mainsettings.h"
|
||||||
#include "commands/command.h"
|
#include "commands/command.h"
|
||||||
#include "audio/audiodevicemanager.h"
|
#include "audio/audiodevicemanager.h"
|
||||||
@ -190,7 +192,7 @@ void MainSettings::deletePresetGroup(const QString& groupName)
|
|||||||
|
|
||||||
void MainSettings::sortPresets()
|
void MainSettings::sortPresets()
|
||||||
{
|
{
|
||||||
qSort(m_presets.begin(), m_presets.end(), Preset::presetCompare);
|
std::sort(m_presets.begin(), m_presets.end(), Preset::presetCompare);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainSettings::renamePresetGroup(const QString& oldGroupName, const QString& newGroupName)
|
void MainSettings::renamePresetGroup(const QString& oldGroupName, const QString& newGroupName)
|
||||||
@ -266,7 +268,7 @@ void MainSettings::deleteCommandGroup(const QString& groupName)
|
|||||||
|
|
||||||
void MainSettings::sortCommands()
|
void MainSettings::sortCommands()
|
||||||
{
|
{
|
||||||
qSort(m_commands.begin(), m_commands.end(), Command::commandCompare);
|
std::sort(m_commands.begin(), m_commands.end(), Command::commandCompare);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainSettings::renameCommandGroup(const QString& oldGroupName, const QString& newGroupName)
|
void MainSettings::renameCommandGroup(const QString& oldGroupName, const QString& newGroupName)
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "gui/glspectrum.h"
|
#include "gui/glspectrum.h"
|
||||||
#include "dsp/spectrumvis.h"
|
#include "dsp/spectrumvis.h"
|
||||||
#include "gui/glspectrumgui.h"
|
#include "gui/glspectrumgui.h"
|
||||||
@ -230,7 +232,7 @@ void DeviceUISet::saveRxChannelSettings(Preset *preset)
|
|||||||
{
|
{
|
||||||
if (preset->isSourcePreset())
|
if (preset->isSourcePreset())
|
||||||
{
|
{
|
||||||
qSort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
std::sort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
||||||
|
|
||||||
for(int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
for(int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
||||||
{
|
{
|
||||||
@ -308,7 +310,7 @@ void DeviceUISet::saveTxChannelSettings(Preset *preset)
|
|||||||
{
|
{
|
||||||
if (preset->isSinkPreset())
|
if (preset->isSinkPreset())
|
||||||
{
|
{
|
||||||
qSort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
std::sort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
||||||
|
|
||||||
for(int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
for(int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
||||||
{
|
{
|
||||||
@ -386,7 +388,7 @@ void DeviceUISet::saveMIMOChannelSettings(Preset *preset)
|
|||||||
{
|
{
|
||||||
if (preset->isMIMOPreset())
|
if (preset->isMIMOPreset())
|
||||||
{
|
{
|
||||||
qSort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
std::sort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
||||||
|
|
||||||
for(int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
for(int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
||||||
{
|
{
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#define SDRBASE_GUI_LEVELMETER_H_
|
#define SDRBASE_GUI_LEVELMETER_H_
|
||||||
|
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
#include <QElapsedTimer>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
#include "dsp/dsptypes.h"
|
#include "dsp/dsptypes.h"
|
||||||
@ -102,7 +103,7 @@ protected:
|
|||||||
/**
|
/**
|
||||||
* Time at which m_peakLevel was last changed.
|
* Time at which m_peakLevel was last changed.
|
||||||
*/
|
*/
|
||||||
QTime m_peakLevelChanged;
|
QElapsedTimer m_peakLevelChanged;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rate at which peak level bar decays.
|
* Rate at which peak level bar decays.
|
||||||
@ -119,7 +120,7 @@ protected:
|
|||||||
/**
|
/**
|
||||||
* Time at which m_peakHoldLevel was last changed.
|
* Time at which m_peakHoldLevel was last changed.
|
||||||
*/
|
*/
|
||||||
QTime m_peakHoldLevelChanged;
|
QElapsedTimer m_peakHoldLevelChanged;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Average smoothing factor (between 1: fast and 256: slow)
|
* Average smoothing factor (between 1: fast and 256: slow)
|
||||||
|
@ -807,7 +807,7 @@ QTreeWidgetItem* MainWindow::addPresetToTree(const Preset* preset)
|
|||||||
sl.append(preset->getDescription()); // description column
|
sl.append(preset->getDescription()); // description column
|
||||||
PresetItem* item = new PresetItem(group, sl, preset->getCenterFrequency(), PItem);
|
PresetItem* item = new PresetItem(group, sl, preset->getCenterFrequency(), PItem);
|
||||||
item->setTextAlignment(0, Qt::AlignRight);
|
item->setTextAlignment(0, Qt::AlignRight);
|
||||||
item->setData(0, Qt::UserRole, qVariantFromValue(preset));
|
item->setData(0, Qt::UserRole, QVariant::fromValue(preset));
|
||||||
ui->presetTree->resizeColumnToContents(0); // Resize frequency column to minimum
|
ui->presetTree->resizeColumnToContents(0); // Resize frequency column to minimum
|
||||||
ui->presetTree->resizeColumnToContents(1); // Resize mode column to minimum
|
ui->presetTree->resizeColumnToContents(1); // Resize mode column to minimum
|
||||||
|
|
||||||
@ -843,7 +843,7 @@ QTreeWidgetItem* MainWindow::addCommandToTree(const Command* command)
|
|||||||
sl.append(QString("%1").arg(command->getAssociateKey() ? command->getRelease() ? "R" : "P" : "-")); // key press/release column
|
sl.append(QString("%1").arg(command->getAssociateKey() ? command->getRelease() ? "R" : "P" : "-")); // key press/release column
|
||||||
sl.append(QString("%1").arg(command->getKeyLabel())); // key column
|
sl.append(QString("%1").arg(command->getKeyLabel())); // key column
|
||||||
CommandItem* item = new CommandItem(group, sl, command->getDescription(), PItem);
|
CommandItem* item = new CommandItem(group, sl, command->getDescription(), PItem);
|
||||||
item->setData(0, Qt::UserRole, qVariantFromValue(command));
|
item->setData(0, Qt::UserRole, QVariant::fromValue(command));
|
||||||
item->setTextAlignment(0, Qt::AlignLeft);
|
item->setTextAlignment(0, Qt::AlignLeft);
|
||||||
ui->commandTree->resizeColumnToContents(0); // Resize description column to minimum
|
ui->commandTree->resizeColumnToContents(0); // Resize description column to minimum
|
||||||
ui->commandTree->resizeColumnToContents(1); // Resize key column to minimum
|
ui->commandTree->resizeColumnToContents(1); // Resize key column to minimum
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
#include "dsp/dspdevicesourceengine.h"
|
#include "dsp/dspdevicesourceengine.h"
|
||||||
#include "dsp/dspdevicesinkengine.h"
|
#include "dsp/dspdevicesinkengine.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
@ -233,7 +235,7 @@ void DeviceSet::saveRxChannelSettings(Preset *preset)
|
|||||||
{
|
{
|
||||||
if (preset->isSourcePreset())
|
if (preset->isSourcePreset())
|
||||||
{
|
{
|
||||||
qSort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
std::sort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
||||||
|
|
||||||
for (int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
for (int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
||||||
{
|
{
|
||||||
@ -326,7 +328,7 @@ void DeviceSet::saveTxChannelSettings(Preset *preset)
|
|||||||
{
|
{
|
||||||
if (preset->isSinkPreset())
|
if (preset->isSinkPreset())
|
||||||
{
|
{
|
||||||
qSort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
std::sort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
||||||
|
|
||||||
for (int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
for (int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
||||||
{
|
{
|
||||||
@ -422,7 +424,7 @@ void DeviceSet::saveMIMOChannelSettings(Preset *preset)
|
|||||||
{
|
{
|
||||||
if (preset->isMIMOPreset())
|
if (preset->isMIMOPreset())
|
||||||
{
|
{
|
||||||
qSort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
std::sort(m_channelInstanceRegistrations.begin(), m_channelInstanceRegistrations.end()); // sort by increasing delta frequency and type
|
||||||
|
|
||||||
for (int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
for (int i = 0; i < m_channelInstanceRegistrations.count(); i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user