kopia lustrzana https://github.com/f4exb/sdrangel
Merge branch 'f4exb:master' into mac_package
commit
36a6d088f8
20
CHANGELOG
20
CHANGELOG
|
@ -1,11 +1,17 @@
|
|||
sdrangel (7.0.0-beta.3) unstable; urgency=medium
|
||||
sdrangel (7.0.0beta4-1) unstable; urgency=medium
|
||||
|
||||
* Fixed missing bits in API. Fixes #1247
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Mon, 16 May 2022 18:43:31 +0200
|
||||
|
||||
sdrangel (7.0.0beta3-1) unstable; urgency=medium
|
||||
|
||||
* MainServer: fix adding unique featureset
|
||||
* Fix typing errors in readme's. PR #1245
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 15 May 2022 21:34:30 +0200
|
||||
|
||||
sdrangel (7.0.0-beta.2) unstable; urgency=medium
|
||||
sdrangel (7.0.0beta2-1) unstable; urgency=medium
|
||||
|
||||
* Fixed remaining v7 branch references
|
||||
* SSB and NFM demod: do not process samples if channel sample rate is not set yet (==0)
|
||||
|
@ -13,19 +19,19 @@ sdrangel (7.0.0-beta.2) unstable; urgency=medium
|
|||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 15 May 2022 09:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-beta.1) unstable; urgency=medium
|
||||
sdrangel (7.0.0beta1-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-beta.1
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sat, 14 May 2022 18:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-alpha.4) unstable; urgency=medium
|
||||
sdrangel (7.0.0alpha4-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-alpha.4
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sat, 14 May 2022 11:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-alpha.3) unstable; urgency=medium
|
||||
sdrangel (7.0.0alpha3-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-alpha.3
|
||||
|
||||
|
@ -40,13 +46,13 @@ sdrangel (6.20.3-1) unstable; urgency=medium
|
|||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Wed, 29 Apr 2022 11:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-alpha.2) unstable; urgency=medium
|
||||
sdrangel (7.0.0alpha2-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-alpha.2
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Thu, 28 Apr 2022 11:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-alpha.1) unstable; urgency=medium
|
||||
sdrangel (7.0.0alpha1-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-alpha.1
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|||
set(sdrangel_VERSION_MAJOR "7")
|
||||
set(sdrangel_VERSION_MINOR "0")
|
||||
set(sdrangel_VERSION_PATCH "0")
|
||||
set(sdrangel_VERSION_SUFFIX "beta.3")
|
||||
set(sdrangel_VERSION_SUFFIX "beta.4")
|
||||
|
||||
# SDRAngel cmake options
|
||||
option(DEBUG_OUTPUT "Print debug messages" OFF)
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
sdrangel (7.0.0-beta.3) unstable; urgency=medium
|
||||
sdrangel (7.0.0beta4-1) unstable; urgency=medium
|
||||
|
||||
* Fixed missing bits in API. Fixes #1247
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Mon, 16 May 2022 18:43:31 +0200
|
||||
|
||||
sdrangel (7.0.0beta3-1) unstable; urgency=medium
|
||||
|
||||
* MainServer: fix adding unique featureset
|
||||
* Fix typing errors in readme's. PR #1245
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 15 May 2022 21:34:30 +0200
|
||||
|
||||
sdrangel (7.0.0-beta.2) unstable; urgency=medium
|
||||
sdrangel (7.0.0beta2-1) unstable; urgency=medium
|
||||
|
||||
* Fixed remaining v7 branch references
|
||||
* SSB and NFM demod: do not process samples if channel sample rate is not set yet (==0)
|
||||
|
@ -13,19 +19,19 @@ sdrangel (7.0.0-beta.2) unstable; urgency=medium
|
|||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 15 May 2022 09:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-beta.1) unstable; urgency=medium
|
||||
sdrangel (7.0.0beta1-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-beta.1
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sat, 14 May 2022 18:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-alpha.4) unstable; urgency=medium
|
||||
sdrangel (7.0.0alpha4-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-alpha.4
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sat, 14 May 2022 11:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-alpha.3) unstable; urgency=medium
|
||||
sdrangel (7.0.0alpha3-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-alpha.3
|
||||
|
||||
|
@ -40,13 +46,13 @@ sdrangel (6.20.3-1) unstable; urgency=medium
|
|||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Wed, 29 Apr 2022 11:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-alpha.2) unstable; urgency=medium
|
||||
sdrangel (7.0.0alpha2-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-alpha.2
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Thu, 28 Apr 2022 11:33:12 +0200
|
||||
|
||||
sdrangel (7.0.0-alpha.1) unstable; urgency=medium
|
||||
sdrangel (7.0.0alpha1-1) unstable; urgency=medium
|
||||
|
||||
* See: https://github.com/f4exb/sdrangel/releases/tag/v7.0.0-alpha.1
|
||||
|
||||
|
|
|
@ -40,9 +40,6 @@ AMModBaseband::AMModBaseband() :
|
|||
Qt::QueuedConnection
|
||||
);
|
||||
|
||||
DSPEngine::instance()->getAudioDeviceManager()->addAudioSource(m_source.getAudioFifo(), getInputMessageQueue());
|
||||
m_source.applyAudioSampleRate(DSPEngine::instance()->getAudioDeviceManager()->getInputSampleRate());
|
||||
|
||||
DSPEngine::instance()->getAudioDeviceManager()->addAudioSink(m_source.getFeedbackAudioFifo(), getInputMessageQueue());
|
||||
m_source.applyFeedbackAudioSampleRate(DSPEngine::instance()->getAudioDeviceManager()->getOutputSampleRate());
|
||||
|
||||
|
@ -199,7 +196,6 @@ void AMModBaseband::applySettings(const AMModSettings& settings, bool force)
|
|||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
int audioSampleRate = audioDeviceManager->getInputSampleRate(audioDeviceIndex);
|
||||
|
||||
if (getAudioSampleRate() != audioSampleRate)
|
||||
|
@ -210,6 +206,18 @@ void AMModBaseband::applySettings(const AMModSettings& settings, bool force)
|
|||
}
|
||||
}
|
||||
|
||||
if ((settings.m_modAFInput != m_settings.m_modAFInput) || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
|
||||
if (settings.m_modAFInput == AMModSettings::AMModInputAudio) {
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
} else {
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_feedbackAudioDeviceName != m_settings.m_feedbackAudioDeviceName) || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
|
|
|
@ -37,6 +37,8 @@ AMModSource::AMModSource() :
|
|||
m_ifstream(nullptr),
|
||||
m_mutex(QMutex::Recursive)
|
||||
{
|
||||
m_audioFifo.setLabel("AMModSource.m_audioFifo");
|
||||
m_feedbackAudioFifo.setLabel("AMModSource.m_feedbackAudioFifo");
|
||||
m_audioBuffer.resize(24000);
|
||||
m_audioBufferFill = 0;
|
||||
m_audioReadBuffer.resize(24000);
|
||||
|
|
|
@ -40,9 +40,6 @@ FreeDVModBaseband::FreeDVModBaseband() :
|
|||
Qt::QueuedConnection
|
||||
);
|
||||
|
||||
DSPEngine::instance()->getAudioDeviceManager()->addAudioSource(m_source.getAudioFifo(), getInputMessageQueue());
|
||||
m_source.applyAudioSampleRate(DSPEngine::instance()->getAudioDeviceManager()->getInputSampleRate());
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
|
||||
}
|
||||
|
||||
|
@ -195,7 +192,6 @@ void FreeDVModBaseband::applySettings(const FreeDVModSettings& settings, bool fo
|
|||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
int audioSampleRate = audioDeviceManager->getInputSampleRate(audioDeviceIndex);
|
||||
|
||||
if (getAudioSampleRate() != audioSampleRate) {
|
||||
|
@ -203,6 +199,18 @@ void FreeDVModBaseband::applySettings(const FreeDVModSettings& settings, bool fo
|
|||
}
|
||||
}
|
||||
|
||||
if ((settings.m_modAFInput != m_settings.m_modAFInput) || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
|
||||
if (settings.m_modAFInput == FreeDVModSettings::FreeDVModInputAudio) {
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
} else {
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
}
|
||||
}
|
||||
|
||||
m_source.applySettings(settings, force);
|
||||
|
||||
m_settings = settings;
|
||||
|
@ -211,4 +219,4 @@ void FreeDVModBaseband::applySettings(const FreeDVModSettings& settings, bool fo
|
|||
int FreeDVModBaseband::getChannelSampleRate() const
|
||||
{
|
||||
return m_channelizer->getChannelSampleRate();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ FreeDVModSource::FreeDVModSource() :
|
|||
m_scaleFactor(SDR_TX_SCALEF),
|
||||
m_mutex(QMutex::Recursive)
|
||||
{
|
||||
m_audioFifo.setLabel("FreeDVModSource.m_audioFifo");
|
||||
m_SSBFilter = new fftfilt(m_lowCutoff / m_audioSampleRate, m_hiCutoff / m_audioSampleRate, m_ssbFftLen);
|
||||
m_SSBFilterBuffer = new Complex[m_ssbFftLen>>1]; // filter returns data exactly half of its size
|
||||
std::fill(m_SSBFilterBuffer, m_SSBFilterBuffer+(m_ssbFftLen>>1), Complex{0,0});
|
||||
|
|
|
@ -40,9 +40,6 @@ NFMModBaseband::NFMModBaseband() :
|
|||
Qt::QueuedConnection
|
||||
);
|
||||
|
||||
DSPEngine::instance()->getAudioDeviceManager()->addAudioSource(m_source.getAudioFifo(), getInputMessageQueue());
|
||||
m_source.applyAudioSampleRate(DSPEngine::instance()->getAudioDeviceManager()->getInputSampleRate());
|
||||
|
||||
DSPEngine::instance()->getAudioDeviceManager()->addAudioSink(m_source.getFeedbackAudioFifo(), getInputMessageQueue());
|
||||
m_source.applyFeedbackAudioSampleRate(DSPEngine::instance()->getAudioDeviceManager()->getOutputSampleRate());
|
||||
|
||||
|
@ -199,7 +196,6 @@ void NFMModBaseband::applySettings(const NFMModSettings& settings, bool force)
|
|||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
int audioSampleRate = audioDeviceManager->getInputSampleRate(audioDeviceIndex);
|
||||
|
||||
if (getAudioSampleRate() != audioSampleRate)
|
||||
|
@ -210,6 +206,18 @@ void NFMModBaseband::applySettings(const NFMModSettings& settings, bool force)
|
|||
}
|
||||
}
|
||||
|
||||
if ((settings.m_modAFInput != m_settings.m_modAFInput) || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
|
||||
if (settings.m_modAFInput == NFMModSettings::NFMModInputAudio) {
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
} else {
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_feedbackAudioDeviceName != m_settings.m_feedbackAudioDeviceName) || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
|
|
|
@ -40,6 +40,8 @@ NFMModSource::NFMModSource() :
|
|||
m_ifstream(nullptr),
|
||||
m_mutex(QMutex::Recursive)
|
||||
{
|
||||
m_audioFifo.setLabel("NFMModSource.m_audioFifo");
|
||||
m_feedbackAudioFifo.setLabel("NFMModSource.m_feedbackAudioFifo");
|
||||
m_audioBuffer.resize(24000);
|
||||
m_audioBufferFill = 0;
|
||||
m_audioReadBuffer.resize(24000);
|
||||
|
|
|
@ -41,9 +41,6 @@ SSBModBaseband::SSBModBaseband() :
|
|||
Qt::QueuedConnection
|
||||
);
|
||||
|
||||
DSPEngine::instance()->getAudioDeviceManager()->addAudioSource(m_source.getAudioFifo(), getInputMessageQueue());
|
||||
m_source.applyAudioSampleRate(DSPEngine::instance()->getAudioDeviceManager()->getInputSampleRate());
|
||||
|
||||
DSPEngine::instance()->getAudioDeviceManager()->addAudioSink(m_source.getFeedbackAudioFifo(), getInputMessageQueue());
|
||||
m_source.applyFeedbackAudioSampleRate(DSPEngine::instance()->getAudioDeviceManager()->getOutputSampleRate());
|
||||
|
||||
|
@ -205,7 +202,6 @@ void SSBModBaseband::applySettings(const SSBModSettings& settings, bool force)
|
|||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
int audioSampleRate = audioDeviceManager->getInputSampleRate(audioDeviceIndex);
|
||||
|
||||
if (getAudioSampleRate() != audioSampleRate)
|
||||
|
@ -218,6 +214,18 @@ void SSBModBaseband::applySettings(const SSBModSettings& settings, bool force)
|
|||
}
|
||||
}
|
||||
|
||||
if ((settings.m_modAFInput != m_settings.m_modAFInput) || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
|
||||
if (settings.m_modAFInput == SSBModSettings::SSBModInputAudio) {
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
} else {
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_feedbackAudioDeviceName != m_settings.m_feedbackAudioDeviceName) || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
void setInputFileStream(std::ifstream *ifstream) { m_source.setInputFileStream(ifstream); }
|
||||
AudioFifo *getAudioFifo() { return m_source.getAudioFifo(); }
|
||||
AudioFifo *getFeedbackAudioFifo() { return m_source.getFeedbackAudioFifo(); }
|
||||
void setSpectrumSink(SpectrumVis *sampleSink) { m_spectrumVis = sampleSink; m_source.setSpectrumSink((BasebandSampleSink *) sampleSink); }
|
||||
void setSpectrumSink(SpectrumVis *sampleSink) { m_spectrumVis = sampleSink; m_source.setSpectrumSink(sampleSink); }
|
||||
void setChannel(ChannelAPI *channel);
|
||||
|
||||
signals:
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include <QDebug>
|
||||
|
||||
#include "dsp/basebandsamplesink.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
#include "dsp/misc.h"
|
||||
#include "dsp/datafifo.h"
|
||||
#include "util/messagequeue.h"
|
||||
|
@ -31,6 +31,7 @@ const int SSBModSource::m_levelNbSamples = 480; // every 10ms
|
|||
SSBModSource::SSBModSource() :
|
||||
m_channelSampleRate(48000),
|
||||
m_channelFrequencyOffset(0),
|
||||
m_spectrumSink(nullptr),
|
||||
m_audioSampleRate(48000),
|
||||
m_audioFifo(12000),
|
||||
m_feedbackAudioFifo(48000),
|
||||
|
@ -40,6 +41,8 @@ SSBModSource::SSBModSource() :
|
|||
m_ifstream(nullptr),
|
||||
m_mutex(QMutex::Recursive)
|
||||
{
|
||||
m_audioFifo.setLabel("SSBModSource.m_audioFifo");
|
||||
m_feedbackAudioFifo.setLabel("SSBModSource.m_feedbackAudioFifo");
|
||||
m_SSBFilter = new fftfilt(m_settings.m_lowCutoff / m_audioSampleRate, m_settings.m_bandwidth / m_audioSampleRate, m_ssbFftLen);
|
||||
m_DSBFilter = new fftfilt((2.0f * m_settings.m_bandwidth) / m_audioSampleRate, 2 * m_ssbFftLen);
|
||||
m_SSBFilterBuffer = new Complex[m_ssbFftLen>>1]; // filter returns data exactly half of its size
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
|
||||
#include "ssbmodsettings.h"
|
||||
|
||||
class BasebandSampleSink;
|
||||
class ChannelAPI;
|
||||
class SpectrumVis;
|
||||
|
||||
class SSBModSource : public QObject, public ChannelSampleSource
|
||||
{
|
||||
|
@ -68,7 +68,7 @@ public:
|
|||
}
|
||||
void applySettings(const SSBModSettings& settings, bool force = false);
|
||||
void applyChannelSettings(int channelSampleRate, int channelFrequencyOffset, bool force = 0);
|
||||
void setSpectrumSink(BasebandSampleSink *sampleSink) { m_spectrumSink = sampleSink; }
|
||||
void setSpectrumSink(SpectrumVis *sampleSink) { m_spectrumSink = sampleSink; }
|
||||
|
||||
private:
|
||||
int m_channelSampleRate;
|
||||
|
@ -101,7 +101,7 @@ private:
|
|||
int m_DSBFilterBufferIndex;
|
||||
static const int m_ssbFftLen;
|
||||
|
||||
BasebandSampleSink* m_spectrumSink;
|
||||
SpectrumVis* m_spectrumSink;
|
||||
SampleVector m_sampleBuffer;
|
||||
|
||||
fftfilt::cmplx m_sum;
|
||||
|
|
|
@ -40,9 +40,6 @@ WFMModBaseband::WFMModBaseband() :
|
|||
Qt::QueuedConnection
|
||||
);
|
||||
|
||||
DSPEngine::instance()->getAudioDeviceManager()->addAudioSource(m_source.getAudioFifo(), getInputMessageQueue());
|
||||
m_source.applyAudioSampleRate(DSPEngine::instance()->getAudioDeviceManager()->getInputSampleRate());
|
||||
|
||||
DSPEngine::instance()->getAudioDeviceManager()->addAudioSink(m_source.getFeedbackAudioFifo(), getInputMessageQueue());
|
||||
m_source.applyFeedbackAudioSampleRate(DSPEngine::instance()->getAudioDeviceManager()->getOutputSampleRate());
|
||||
|
||||
|
@ -198,7 +195,6 @@ void WFMModBaseband::applySettings(const WFMModSettings& settings, bool force)
|
|||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
int audioSampleRate = audioDeviceManager->getInputSampleRate(audioDeviceIndex);
|
||||
|
||||
if (getAudioSampleRate() != audioSampleRate) {
|
||||
|
@ -206,6 +202,18 @@ void WFMModBaseband::applySettings(const WFMModSettings& settings, bool force)
|
|||
}
|
||||
}
|
||||
|
||||
if ((settings.m_modAFInput != m_settings.m_modAFInput) || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
|
||||
if (settings.m_modAFInput == WFMModSettings::WFMModInputAudio) {
|
||||
audioDeviceManager->addAudioSource(getAudioFifo(), getInputMessageQueue(), audioDeviceIndex);
|
||||
} else {
|
||||
audioDeviceManager->removeAudioSource(getAudioFifo());
|
||||
}
|
||||
}
|
||||
|
||||
m_source.applySettings(settings, force);
|
||||
|
||||
m_settings = settings;
|
||||
|
|
|
@ -39,6 +39,8 @@ WFMModSource::WFMModSource() :
|
|||
m_ifstream(nullptr),
|
||||
m_mutex(QMutex::Recursive)
|
||||
{
|
||||
m_audioFifo.setLabel("WFMModSource.m_audioFifo");
|
||||
m_feedbackAudioFifo.setLabel("WFMModSource.m_feedbackAudioFifo");
|
||||
m_rfFilter = new fftfilt(-62500.0 / 384000.0, 62500.0 / 384000.0, m_rfFilterFFTLength);
|
||||
m_rfFilterBuffer = new Complex[m_rfFilterFFTLength];
|
||||
std::fill(m_rfFilterBuffer, m_rfFilterBuffer+m_rfFilterFFTLength, Complex{0,0});
|
||||
|
|
|
@ -226,20 +226,7 @@ void SimplePTTWorker::updateHardware()
|
|||
SWGSDRangel::SWGErrorResponse error;
|
||||
m_updateTimer.stop();
|
||||
m_mutex.unlock();
|
||||
|
||||
if (turnDevice(true))
|
||||
{
|
||||
m_webAPIAdapterInterface->devicesetFocusPatch(
|
||||
m_tx ? m_settings.m_txDeviceSetIndex : m_settings.m_rxDeviceSetIndex, response, error);
|
||||
|
||||
if (m_msgQueueToGUI)
|
||||
{
|
||||
SimplePTTReport::MsgRadioState *msg = SimplePTTReport::MsgRadioState::create(
|
||||
m_tx ? SimplePTTReport::RadioTx : SimplePTTReport::RadioRx
|
||||
);
|
||||
m_msgQueueToGUI->push(msg);
|
||||
}
|
||||
}
|
||||
turnDevice(true);
|
||||
}
|
||||
|
||||
bool SimplePTTWorker::turnDevice(bool on)
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include "maincore.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgDeviceSetFocus, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgDVSerial, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgDeleteInstance, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgLoadPreset, Message)
|
||||
|
@ -45,8 +44,6 @@ MESSAGE_CLASS_DEFINITION(MainCore::MsgSaveFeatureSetPreset, Message)
|
|||
MESSAGE_CLASS_DEFINITION(MainCore::MsgDeleteFeatureSetPreset, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgAddDeviceSet, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgRemoveLastDeviceSet, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgAddFeatureSet, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgRemoveLastFeatureSet, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgSetDevice, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgAddChannel, Message)
|
||||
MESSAGE_CLASS_DEFINITION(MainCore::MsgDeleteChannel, Message)
|
||||
|
@ -164,6 +161,13 @@ Feature *MainCore::getFeature(unsigned int featureSetIndex, int featureIndex)
|
|||
void MainCore::appendFeatureSet()
|
||||
{
|
||||
int newIndex = m_featureSets.size();
|
||||
|
||||
if (newIndex != 0)
|
||||
{
|
||||
qWarning("MainCore::appendFeatureSet: attempt to add more than one feature set (%d)", newIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
FeatureSet *featureSet = new FeatureSet(newIndex);
|
||||
m_featureSets.push_back(featureSet);
|
||||
m_featureSetsMap.insert(featureSet, newIndex);
|
||||
|
|
|
@ -58,26 +58,6 @@ class SDRBASE_API MainCore : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
class SDRBASE_API MsgDeviceSetFocus : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
int getDeviceSetIndex() const { return m_deviceSetIndex; }
|
||||
|
||||
static MsgDeviceSetFocus* create(int deviceSetIndex)
|
||||
{
|
||||
return new MsgDeviceSetFocus(deviceSetIndex);
|
||||
}
|
||||
|
||||
private:
|
||||
int m_deviceSetIndex;
|
||||
|
||||
MsgDeviceSetFocus(int deviceSetIndex) :
|
||||
Message(),
|
||||
m_deviceSetIndex(deviceSetIndex)
|
||||
{ }
|
||||
};
|
||||
|
||||
class SDRBASE_API MsgDVSerial : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
|
@ -376,34 +356,6 @@ public:
|
|||
{ }
|
||||
};
|
||||
|
||||
class SDRBASE_API MsgAddFeatureSet : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
static MsgAddFeatureSet* create() {
|
||||
return new MsgAddFeatureSet();
|
||||
}
|
||||
|
||||
private:
|
||||
MsgAddFeatureSet() :
|
||||
Message()
|
||||
{ }
|
||||
};
|
||||
|
||||
class SDRBASE_API MsgRemoveLastFeatureSet : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
static MsgRemoveLastFeatureSet* create() {
|
||||
return new MsgRemoveLastFeatureSet();
|
||||
}
|
||||
|
||||
private:
|
||||
MsgRemoveLastFeatureSet() :
|
||||
Message()
|
||||
{ }
|
||||
};
|
||||
|
||||
class SDRBASE_API MsgSetDevice : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
|
|
|
@ -14552,9 +14552,6 @@ margin-bottom: 20px;
|
|||
<li data-group="DeviceSet" data-name="devicesetDeviceWorkspacePut" class="">
|
||||
<a href="#api-DeviceSet-devicesetDeviceWorkspacePut">devicesetDeviceWorkspacePut</a>
|
||||
</li>
|
||||
<li data-group="DeviceSet" data-name="devicesetFocusPatch" class="">
|
||||
<a href="#api-DeviceSet-devicesetFocusPatch">devicesetFocusPatch</a>
|
||||
</li>
|
||||
<li data-group="DeviceSet" data-name="devicesetGet" class="">
|
||||
<a href="#api-DeviceSet-devicesetGet">devicesetGet</a>
|
||||
</li>
|
||||
|
@ -26686,467 +26683,6 @@ $(document).ready(function() {
|
|||
</article>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="api-DeviceSet-devicesetFocusPatch">
|
||||
<article id="api-DeviceSet-devicesetFocusPatch-0" data-group="User" data-name="devicesetFocusPatch" data-version="0">
|
||||
<div class="pull-left">
|
||||
<h1>devicesetFocusPatch</h1>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="pull-right"></div>
|
||||
<div class="clearfix"></div>
|
||||
<p></p>
|
||||
<p class="marked">Set focus on device set (GUI only)</p>
|
||||
<p></p>
|
||||
<br />
|
||||
<pre class="prettyprint language-html prettyprinted" data-type="patch"><code><span class="pln">/sdrangel/deviceset/{deviceSetIndex}/focus</span></code></pre>
|
||||
<p>
|
||||
<h3>Usage and SDK Samples</h3>
|
||||
</p>
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
<li class="active"><a href="#examples-DeviceSet-devicesetFocusPatch-0-curl">Curl</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-java">Java</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-android">Android</a></li>
|
||||
<!--<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-groovy">Groovy</a></li>-->
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-objc">Obj-C</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-javascript">JavaScript</a></li>
|
||||
<!--<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-angular">Angular</a></li>-->
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-csharp">C#</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-php">PHP</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-perl">Perl</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-python">Python</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="examples-DeviceSet-devicesetFocusPatch-0-curl">
|
||||
<pre class="prettyprint"><code class="language-bsh">curl -X PATCH "http://localhost/sdrangel/deviceset/{deviceSetIndex}/focus"</code></pre>
|
||||
</div>
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-java">
|
||||
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
|
||||
import SWGSDRangel.auth.*;
|
||||
import SWGSDRangel.model.*;
|
||||
import SWGSDRangel.api.DeviceSetApi;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
public class DeviceSetApiExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
DeviceSetApi apiInstance = new DeviceSetApi();
|
||||
Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
|
||||
try {
|
||||
SuccessResponse result = apiInstance.devicesetFocusPatch(deviceSetIndex);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling DeviceSetApi#devicesetFocusPatch");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-android">
|
||||
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.DeviceSetApi;
|
||||
|
||||
public class DeviceSetApiExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
DeviceSetApi apiInstance = new DeviceSetApi();
|
||||
Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
|
||||
try {
|
||||
SuccessResponse result = apiInstance.devicesetFocusPatch(deviceSetIndex);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling DeviceSetApi#devicesetFocusPatch");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
<!--
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-groovy">
|
||||
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
|
||||
</div> -->
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-objc">
|
||||
<pre class="prettyprint"><code class="language-cpp">Integer *deviceSetIndex = 56; // Index of device set in the device set list
|
||||
|
||||
DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
|
||||
|
||||
[apiInstance devicesetFocusPatchWith:deviceSetIndex
|
||||
completionHandler: ^(SuccessResponse output, NSError* error) {
|
||||
if (output) {
|
||||
NSLog(@"%@", output);
|
||||
}
|
||||
if (error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}
|
||||
}];
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-javascript">
|
||||
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
|
||||
|
||||
var api = new SdRangel.DeviceSetApi()
|
||||
|
||||
var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
|
||||
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
api.devicesetFocusPatch(deviceSetIndex, callback);
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<!--<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-angular">
|
||||
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
|
||||
</div>-->
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-csharp">
|
||||
<pre class="prettyprint"><code class="language-cs">using System;
|
||||
using System.Diagnostics;
|
||||
using SWGSDRangel.Api;
|
||||
using SWGSDRangel.Client;
|
||||
using SWGSDRangel.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class devicesetFocusPatchExample
|
||||
{
|
||||
public void main()
|
||||
{
|
||||
|
||||
var apiInstance = new DeviceSetApi();
|
||||
var deviceSetIndex = 56; // Integer | Index of device set in the device set list
|
||||
|
||||
try
|
||||
{
|
||||
SuccessResponse result = apiInstance.devicesetFocusPatch(deviceSetIndex);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print("Exception when calling DeviceSetApi.devicesetFocusPatch: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-php">
|
||||
<pre class="prettyprint"><code class="language-php"><?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\DeviceSetApi();
|
||||
$deviceSetIndex = 56; // Integer | Index of device set in the device set list
|
||||
|
||||
try {
|
||||
$result = $api_instance->devicesetFocusPatch($deviceSetIndex);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling DeviceSetApi->devicesetFocusPatch: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
?></code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-perl">
|
||||
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
|
||||
use SWGSDRangel::Configuration;
|
||||
use SWGSDRangel::DeviceSetApi;
|
||||
|
||||
my $api_instance = SWGSDRangel::DeviceSetApi->new();
|
||||
my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->devicesetFocusPatch(deviceSetIndex => $deviceSetIndex);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling DeviceSetApi->devicesetFocusPatch: $@\n";
|
||||
}</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-python">
|
||||
<pre class="prettyprint"><code class="language-python">from __future__ import print_statement
|
||||
import time
|
||||
import swagger_sdrangel
|
||||
from swagger_sdrangel.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_sdrangel.DeviceSetApi()
|
||||
deviceSetIndex = 56 # Integer | Index of device set in the device set list
|
||||
|
||||
try:
|
||||
api_response = api_instance.deviceset_focus_patch(deviceSetIndex)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print("Exception when calling DeviceSetApi->devicesetFocusPatch: %s\n" % e)</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Parameters</h2>
|
||||
|
||||
<div class="methodsubtabletitle">Path parameters</div>
|
||||
<table id="methodsubtable">
|
||||
<tr>
|
||||
<th width="150px">Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr><td style="width:150px;">deviceSetIndex*</td>
|
||||
<td>
|
||||
|
||||
|
||||
<div id="d2e199_devicesetFocusPatch_deviceSetIndex">
|
||||
<div class="json-schema-view">
|
||||
<div class="primitive">
|
||||
<span class="type">
|
||||
Integer
|
||||
</span>
|
||||
|
||||
<div class="inner description">
|
||||
Index of device set in the device set list
|
||||
</div>
|
||||
</div>
|
||||
<div class="inner required">
|
||||
Required
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Responses</h2>
|
||||
<h3> Status: 202 - Message to focus on device set was sent successfully </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-202-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-202-schema">
|
||||
<div id='responses-devicesetFocusPatch-202-schema-202' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Message to focus on device set was sent successfully",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/SuccessResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-202-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-202-schema-202');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-202-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3> Status: 400 - Unsupported (srver instance) </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-400-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-400-schema">
|
||||
<div id='responses-devicesetFocusPatch-400-schema-400' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Unsupported (srver instance)",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/ErrorResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-400-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-400-schema-400');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-400-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3> Status: 404 - Invalid index </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-404-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-404-schema">
|
||||
<div id='responses-devicesetFocusPatch-404-schema-404' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Invalid index",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/ErrorResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-404-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-404-schema-404');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-404-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3> Status: 500 - Error </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-500-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-500-schema">
|
||||
<div id='responses-devicesetFocusPatch-500-schema-500' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Error",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/ErrorResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-500-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-500-schema-500');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-500-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3> Status: 501 - Function not implemented </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-501-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-501-schema">
|
||||
<div id='responses-devicesetFocusPatch-501-schema-501' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Function not implemented",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/ErrorResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-501-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-501-schema-501');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-501-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="api-DeviceSet-devicesetGet">
|
||||
<article id="api-DeviceSet-devicesetGet-0" data-group="User" data-name="devicesetGet" data-version="0">
|
||||
<div class="pull-left">
|
||||
|
@ -60155,7 +59691,7 @@ except ApiException as e:
|
|||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2022-05-14T13:17:30.416+02:00
|
||||
Generated 2022-05-16T19:55:17.622+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1381,37 +1381,6 @@ paths:
|
|||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/deviceset/{deviceSetIndex}/focus:
|
||||
x-swagger-router-controller: deviceset
|
||||
patch:
|
||||
description: Set focus on device set (GUI only)
|
||||
operationId: devicesetFocusPatch
|
||||
tags:
|
||||
- DeviceSet
|
||||
parameters:
|
||||
- in: path
|
||||
name: deviceSetIndex
|
||||
type: integer
|
||||
required: true
|
||||
description: Index of device set in the device set list
|
||||
responses:
|
||||
"202":
|
||||
description: Message to focus on device set was sent successfully
|
||||
schema:
|
||||
$ref: "#/definitions/SuccessResponse"
|
||||
"400":
|
||||
description: Unsupported (srver instance)
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"404":
|
||||
description: Invalid index
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"500":
|
||||
$ref: "#/responses/Response_500"
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings:
|
||||
x-swagger-router-controller: deviceset
|
||||
get:
|
||||
|
|
|
@ -2059,9 +2059,7 @@ int WebAPIAdapter::instanceDeviceSetDelete(
|
|||
SWGSDRangel::SWGSuccessResponse& response,
|
||||
SWGSDRangel::SWGErrorResponse& error)
|
||||
{
|
||||
unsigned int minFeatureSets = QCoreApplication::applicationName() == "SDRangelSrv" ? 0 : 1;
|
||||
|
||||
if (m_mainCore->m_deviceSets.size() > minFeatureSets)
|
||||
if (m_mainCore->m_deviceSets.size() > 0)
|
||||
{
|
||||
MainCore::MsgRemoveLastDeviceSet *msg = MainCore::MsgRemoveLastDeviceSet::create();
|
||||
m_mainCore->m_mainMessageQueue->push(msg);
|
||||
|
@ -2129,30 +2127,6 @@ int WebAPIAdapter::devicesetGet(
|
|||
}
|
||||
}
|
||||
|
||||
int WebAPIAdapter::devicesetFocusPatch(
|
||||
int deviceSetIndex,
|
||||
SWGSDRangel::SWGSuccessResponse& response,
|
||||
SWGSDRangel::SWGErrorResponse& error)
|
||||
{
|
||||
if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_mainCore->m_deviceSets.size()))
|
||||
{
|
||||
MainCore::MsgDeviceSetFocus *msg = MainCore::MsgDeviceSetFocus::create(deviceSetIndex);
|
||||
m_mainCore->m_mainMessageQueue->push(msg);
|
||||
|
||||
response.init();
|
||||
*response.getMessage() = QString("Message to focus on device set (MsgDeviceSetFocus) was submitted successfully");
|
||||
|
||||
return 202;
|
||||
}
|
||||
else
|
||||
{
|
||||
error.init();
|
||||
*error.getMessage() = QString("There is no device set with index %1").arg(deviceSetIndex);
|
||||
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
|
||||
int WebAPIAdapter::devicesetSpectrumSettingsGet(
|
||||
int deviceSetIndex,
|
||||
SWGSDRangel::SWGGLSpectrum& response,
|
||||
|
|
|
@ -289,11 +289,6 @@ public:
|
|||
SWGSDRangel::SWGDeviceSet& response,
|
||||
SWGSDRangel::SWGErrorResponse& error);
|
||||
|
||||
virtual int devicesetFocusPatch(
|
||||
int deviceSetIndex,
|
||||
SWGSDRangel::SWGSuccessResponse& response,
|
||||
SWGSDRangel::SWGErrorResponse& error);
|
||||
|
||||
virtual int devicesetSpectrumSettingsGet(
|
||||
int deviceSetIndex,
|
||||
SWGSDRangel::SWGGLSpectrum& response,
|
||||
|
|
|
@ -55,7 +55,6 @@ QString WebAPIAdapterInterface::featuresetFeatureURL("/sdrangel/featureset/featu
|
|||
QString WebAPIAdapterInterface::featuresetPresetURL("/sdrangel/featureset/preset");
|
||||
|
||||
std::regex WebAPIAdapterInterface::devicesetURLRe("^/sdrangel/deviceset/([0-9]{1,2})$");
|
||||
std::regex WebAPIAdapterInterface::devicesetFocusURLRe("^/sdrangel/deviceset/([0-9]{1,2})/focus$");
|
||||
std::regex WebAPIAdapterInterface::devicesetSpectrumSettingsURLRe("^/sdrangel/deviceset/([0-9]{1,2})/spectrum/settings$");
|
||||
std::regex WebAPIAdapterInterface::devicesetSpectrumServerURLRe("^/sdrangel/deviceset/([0-9]{1,2})/spectrum/server$");
|
||||
std::regex WebAPIAdapterInterface::devicesetSpectrumWorkspaceURLRe("^/sdrangel/deviceset/([0-9]{1,2})/spectrum/workspace$");
|
||||
|
|
|
@ -985,22 +985,6 @@ public:
|
|||
return 501;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler of /sdrangel/deviceset/{devicesetIndex}/focus (PATCH) swagger/sdrangel/code/html2/index.html#api-Default-instanceChannels
|
||||
* returns the Http status code (default 501: not implemented)
|
||||
*/
|
||||
virtual int devicesetFocusPatch(
|
||||
int deviceSetIndex,
|
||||
SWGSDRangel::SWGSuccessResponse& response,
|
||||
SWGSDRangel::SWGErrorResponse& error)
|
||||
{
|
||||
(void) deviceSetIndex;
|
||||
(void) response;
|
||||
error.init();
|
||||
*error.getMessage() = QString("Function not implemented");
|
||||
return 501;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler of /sdrangel/deviceset/{devicesetIndex}/spectrum/settings (GET)
|
||||
* returns the Http status code (default 501: not implemented)
|
||||
|
@ -1825,7 +1809,6 @@ public:
|
|||
static QString featuresetFeatureURL;
|
||||
static QString featuresetPresetURL;
|
||||
static std::regex devicesetURLRe;
|
||||
static std::regex devicesetFocusURLRe;
|
||||
static std::regex devicesetSpectrumSettingsURLRe;
|
||||
static std::regex devicesetSpectrumServerURLRe;
|
||||
static std::regex devicesetSpectrumWorkspaceURLRe;
|
||||
|
|
|
@ -193,8 +193,6 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http
|
|||
devicesetService(std::string(desc_match[1]), request, response);
|
||||
} else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetDeviceURLRe)) {
|
||||
devicesetDeviceService(std::string(desc_match[1]), request, response);
|
||||
} else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetFocusURLRe)) {
|
||||
devicesetFocusService(std::string(desc_match[1]), request, response);
|
||||
} else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetSpectrumSettingsURLRe)) {
|
||||
devicesetSpectrumSettingsService(std::string(desc_match[1]), request, response);
|
||||
} else if (std::regex_match(pathStr, desc_match, WebAPIAdapterInterface::devicesetSpectrumServerURLRe)) {
|
||||
|
@ -2079,46 +2077,6 @@ void WebAPIRequestMapper::devicesetService(const std::string& indexStr, qtwebapp
|
|||
}
|
||||
}
|
||||
|
||||
void WebAPIRequestMapper::devicesetFocusService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||
{
|
||||
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||
response.setHeader("Content-Type", "application/json");
|
||||
response.setHeader("Access-Control-Allow-Origin", "*");
|
||||
|
||||
try
|
||||
{
|
||||
int deviceSetIndex = boost::lexical_cast<int>(indexStr);
|
||||
|
||||
if (request.getMethod() == "PATCH")
|
||||
{
|
||||
SWGSDRangel::SWGSuccessResponse normalResponse;
|
||||
int status = m_adapter->devicesetFocusPatch(deviceSetIndex, normalResponse, errorResponse);
|
||||
|
||||
response.setStatus(status);
|
||||
|
||||
if (status/100 == 2) {
|
||||
response.write(normalResponse.asJson().toUtf8());
|
||||
} else {
|
||||
response.write(errorResponse.asJson().toUtf8());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
response.setStatus(405,"Invalid HTTP method");
|
||||
errorResponse.init();
|
||||
*errorResponse.getMessage() = "Invalid HTTP method";
|
||||
response.write(errorResponse.asJson().toUtf8());
|
||||
}
|
||||
}
|
||||
catch (const boost::bad_lexical_cast &e)
|
||||
{
|
||||
errorResponse.init();
|
||||
*errorResponse.getMessage() = "Wrong integer conversion on device set index";
|
||||
response.setStatus(400,"Invalid data");
|
||||
response.write(errorResponse.asJson().toUtf8());
|
||||
}
|
||||
}
|
||||
|
||||
void WebAPIRequestMapper::devicesetSpectrumSettingsService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)
|
||||
{
|
||||
SWGSDRangel::SWGErrorResponse errorResponse;
|
||||
|
|
|
@ -88,7 +88,6 @@ private:
|
|||
void instanceWorkspaceService(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
||||
|
||||
void devicesetService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
||||
void devicesetFocusService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
||||
void devicesetSpectrumSettingsService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
||||
void devicesetSpectrumServerService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
||||
void devicesetSpectrumWorkspaceService(const std::string& indexStr, qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response);
|
||||
|
|
|
@ -664,10 +664,6 @@ void LimeRFEUSBDialog::stopStartRx(bool start)
|
|||
if (deviceSourceEngine->initAcquisition()) {
|
||||
deviceSourceEngine->startAcquisition();
|
||||
}
|
||||
|
||||
MainCore *mainCore = MainCore::instance();
|
||||
MainCore::MsgDeviceSetFocus *msg = MainCore::MsgDeviceSetFocus::create(m_rxDeviceSetIndex[rxDeviceSetSequence]);
|
||||
mainCore->getMainMessageQueue()->push(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -690,10 +686,6 @@ void LimeRFEUSBDialog::stopStartTx(bool start)
|
|||
if (deviceSinkEngine->initGeneration()) {
|
||||
deviceSinkEngine->startGeneration();
|
||||
}
|
||||
|
||||
MainCore *mainCore = MainCore::instance();
|
||||
MainCore::MsgDeviceSetFocus *msg = MainCore::MsgDeviceSetFocus::create(m_txDeviceSetIndex[txDeviceSetSequence]);
|
||||
mainCore->getMainMessageQueue()->push(msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1075,11 +1075,17 @@ void MainWindow::removeLastDeviceSet()
|
|||
|
||||
void MainWindow::addFeatureSet()
|
||||
{
|
||||
int tabIndex = m_featureUIs.size();
|
||||
int newFeatureSetIndex = m_featureUIs.size();
|
||||
|
||||
if (newFeatureSetIndex != 0)
|
||||
{
|
||||
qWarning("MainWindow::addFeatureSet: attempt to add more than one feature set (%d)", newFeatureSetIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
m_mainCore->appendFeatureSet();
|
||||
m_featureUIs.push_back(new FeatureUISet(tabIndex, m_mainCore->m_featureSets[tabIndex]));
|
||||
// ui->tabFeatures->addTab(m_featureUIs.back()->m_featureWindow, QString("F%1").arg(tabIndex));
|
||||
emit m_mainCore->featureSetAdded(tabIndex);
|
||||
m_featureUIs.push_back(new FeatureUISet(newFeatureSetIndex, m_mainCore->m_featureSets[newFeatureSetIndex]));
|
||||
emit m_mainCore->featureSetAdded(newFeatureSetIndex);
|
||||
}
|
||||
|
||||
void MainWindow::removeFeatureSet(unsigned int tabIndex)
|
||||
|
@ -1572,11 +1578,10 @@ bool MainWindow::handleMessage(const Message& cmd)
|
|||
}
|
||||
else if (MainCore::MsgSavePreset::match(cmd))
|
||||
{
|
||||
// MainCore::MsgSavePreset& notif = (MainCore::MsgSavePreset&) cmd;
|
||||
// saveDeviceSetPresetSettings(notif.getPreset(), notif.getDeviceSetIndex());
|
||||
// if (notif.isNewPreset()) { ui->presetTree->setCurrentItem(addPresetToTree(notif.getPreset())); }
|
||||
// m_mainCore->m_settings.sortPresets();
|
||||
// m_mainCore->m_settings.save();
|
||||
MainCore::MsgSavePreset& notif = (MainCore::MsgSavePreset&) cmd;
|
||||
saveDeviceSetPresetSettings(notif.getPreset(), notif.getDeviceSetIndex());
|
||||
m_mainCore->m_settings.sortPresets();
|
||||
m_mainCore->m_settings.save();
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgLoadFeatureSetPreset::match(cmd))
|
||||
|
@ -1650,22 +1655,22 @@ bool MainWindow::handleMessage(const Message& cmd)
|
|||
MainCore::MsgAddDeviceSet& notif = (MainCore::MsgAddDeviceSet&) cmd;
|
||||
int direction = notif.getDirection();
|
||||
|
||||
// TODO: implement add workspace API. Will have to give the workspace index that will be ignored
|
||||
// in Server flavor. Set nullptr for workspace if index is out of bonds
|
||||
|
||||
if (direction == 1) { // Single stream Tx
|
||||
sampleSinkAdd(nullptr, nullptr, -1); // create with file output device by default
|
||||
} else if (direction == 0) { // Single stream Rx
|
||||
sampleSourceAdd(nullptr, nullptr, -1); // create with file input device by default
|
||||
} else if (direction == 2) { // MIMO
|
||||
sampleMIMOAdd(nullptr, nullptr, -1); // create with testMI MIMO device y default
|
||||
if (m_workspaces.size() > 0)
|
||||
{
|
||||
if (direction == 1) { // Single stream Tx
|
||||
sampleSinkAdd(m_workspaces[0], m_workspaces[0], -1); // create with file output device by default
|
||||
} else if (direction == 0) { // Single stream Rx
|
||||
sampleSourceAdd(m_workspaces[0], m_workspaces[0], -1); // create with file input device by default
|
||||
} else if (direction == 2) { // MIMO
|
||||
sampleMIMOAdd(m_workspaces[0], m_workspaces[0], -1); // create with testMI MIMO device by default
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgRemoveLastDeviceSet::match(cmd))
|
||||
{
|
||||
if (m_deviceUIs.size() > 1) {
|
||||
if (m_deviceUIs.size() > 0) {
|
||||
removeLastDeviceSet();
|
||||
}
|
||||
|
||||
|
@ -1674,59 +1679,49 @@ bool MainWindow::handleMessage(const Message& cmd)
|
|||
else if (MainCore::MsgSetDevice::match(cmd))
|
||||
{
|
||||
MainCore::MsgSetDevice& notif = (MainCore::MsgSetDevice&) cmd;
|
||||
int deviceSetIndex = notif.getDeviceSetIndex();
|
||||
|
||||
// TODO: implement add workspace API. Will have to give the workspace index that will be ignored
|
||||
// in Server flavor. Set nullptr for workspace if index is out of bonds
|
||||
|
||||
sampleDeviceChange(notif.getDeviceType(), notif.getDeviceSetIndex(), notif.getDeviceIndex(), nullptr);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgAddFeatureSet::match(cmd))
|
||||
{
|
||||
addFeatureSet();
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgRemoveLastFeatureSet::match(cmd))
|
||||
{
|
||||
if (m_mainCore->m_featureSets.size() != 0) {
|
||||
removeFeatureSet(m_mainCore->m_featureSets.size() - 1);
|
||||
if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_deviceUIs.size()))
|
||||
{
|
||||
Workspace *workspace = m_workspaces[m_deviceUIs[deviceSetIndex]->m_deviceGUI->getWorkspaceIndex()];
|
||||
sampleDeviceChange(notif.getDeviceType(), notif.getDeviceSetIndex(), notif.getDeviceIndex(), workspace);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgAddChannel::match(cmd))
|
||||
{
|
||||
// MainCore::MsgAddChannel& notif = (MainCore::MsgAddChannel&) cmd;
|
||||
// ui->tabInputsView->setCurrentIndex(notif.getDeviceSetIndex());
|
||||
// int currentChannelTabIndex = ui->tabChannels->currentIndex();
|
||||
MainCore::MsgAddChannel& notif = (MainCore::MsgAddChannel&) cmd;
|
||||
int deviceSetIndex = notif.getDeviceSetIndex();
|
||||
|
||||
// if (currentChannelTabIndex >= 0)
|
||||
// {
|
||||
// DeviceUISet *deviceUI = m_deviceUIs[currentChannelTabIndex];
|
||||
// int channelRegistrationIndex;
|
||||
if ((deviceSetIndex >= 0) && (deviceSetIndex < (int) m_deviceUIs.size()))
|
||||
{
|
||||
DeviceUISet *deviceUISet = m_deviceUIs[deviceSetIndex];
|
||||
int deviceWorkspaceIndex = deviceUISet->m_deviceGUI->getWorkspaceIndex();
|
||||
deviceWorkspaceIndex = deviceWorkspaceIndex < m_workspaces.size() ? deviceWorkspaceIndex : 0;
|
||||
int channelRegistrationIndex;
|
||||
|
||||
// if (deviceUI->m_deviceMIMOEngine)
|
||||
// {
|
||||
// int nbMIMOChannels = deviceUI->getNumberOfAvailableMIMOChannels();
|
||||
// int nbRxChannels = deviceUI->getNumberOfAvailableRxChannels();
|
||||
// int direction = notif.getDirection();
|
||||
if (deviceUISet->m_deviceMIMOEngine)
|
||||
{
|
||||
int nbMIMOChannels = deviceUISet->getNumberOfAvailableMIMOChannels();
|
||||
int nbRxChannels = deviceUISet->getNumberOfAvailableRxChannels();
|
||||
int direction = notif.getDirection();
|
||||
|
||||
// if (direction == 2) {
|
||||
// channelRegistrationIndex = notif.getChannelRegistrationIndex();
|
||||
// } else if (direction == 0) {
|
||||
// channelRegistrationIndex = nbMIMOChannels + notif.getChannelRegistrationIndex();
|
||||
// } else {
|
||||
// channelRegistrationIndex = nbMIMOChannels + nbRxChannels + notif.getChannelRegistrationIndex();
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// channelRegistrationIndex = notif.getChannelRegistrationIndex();
|
||||
// }
|
||||
if (direction == 2) {
|
||||
channelRegistrationIndex = notif.getChannelRegistrationIndex();
|
||||
} else if (direction == 0) {
|
||||
channelRegistrationIndex = nbMIMOChannels + notif.getChannelRegistrationIndex();
|
||||
} else {
|
||||
channelRegistrationIndex = nbMIMOChannels + nbRxChannels + notif.getChannelRegistrationIndex();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
channelRegistrationIndex = notif.getChannelRegistrationIndex();
|
||||
}
|
||||
|
||||
// channelAddClicked(channelRegistrationIndex);
|
||||
// }
|
||||
channelAddClicked(m_workspaces[deviceWorkspaceIndex], deviceSetIndex, channelRegistrationIndex);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1736,28 +1731,20 @@ bool MainWindow::handleMessage(const Message& cmd)
|
|||
deleteChannel(notif.getDeviceSetIndex(), notif.getChannelIndex());
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgDeviceSetFocus::match(cmd))
|
||||
{
|
||||
// MainCore::MsgDeviceSetFocus& notif = (MainCore::MsgDeviceSetFocus&) cmd;
|
||||
// int index = notif.getDeviceSetIndex();
|
||||
// if ((index >= 0) && (index < (int) m_deviceUIs.size())) {
|
||||
// ui->tabInputsView->setCurrentIndex(index);
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgAddFeature::match(cmd))
|
||||
{
|
||||
// MainCore::MsgAddFeature& notif = (MainCore::MsgAddFeature&) cmd;
|
||||
// ui->tabFeatures->setCurrentIndex(notif.getFeatureSetIndex());
|
||||
// featureAddClicked(notif.getFeatureRegistrationIndex());
|
||||
MainCore::MsgAddFeature& notif = (MainCore::MsgAddFeature&) cmd;
|
||||
|
||||
if (m_workspaces.size() > 0) {
|
||||
featureAddClicked(m_workspaces[0], notif.getFeatureRegistrationIndex());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgDeleteFeature::match(cmd))
|
||||
{
|
||||
MainCore::MsgDeleteFeature& notif = (MainCore::MsgDeleteFeature&) cmd;
|
||||
deleteFeature(notif.getFeatureSetIndex(), notif.getFeatureIndex());
|
||||
deleteFeature(0, notif.getFeatureIndex());
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgMoveDeviceUIToWorkspace::match(cmd))
|
||||
|
|
|
@ -200,19 +200,6 @@ bool MainServer::handleMessage(const Message& cmd)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgAddFeatureSet::match(cmd))
|
||||
{
|
||||
addFeatureSet();
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgRemoveLastFeatureSet::match(cmd))
|
||||
{
|
||||
if (m_mainCore->m_featureSets.size() != 0) {
|
||||
removeFeatureSet(m_mainCore->m_featureSets.size() - 1);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgAddChannel::match(cmd))
|
||||
{
|
||||
MainCore::MsgAddChannel& notif = (MainCore::MsgAddChannel&) cmd;
|
||||
|
@ -228,14 +215,14 @@ bool MainServer::handleMessage(const Message& cmd)
|
|||
else if (MainCore::MsgAddFeature::match(cmd))
|
||||
{
|
||||
MainCore::MsgAddFeature& notif = (MainCore::MsgAddFeature&) cmd;
|
||||
addFeature(notif.getFeatureSetIndex(), notif.getFeatureRegistrationIndex());
|
||||
addFeature(0, notif.getFeatureRegistrationIndex());
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgDeleteFeature::match(cmd))
|
||||
{
|
||||
MainCore::MsgDeleteFeature& notif = (MainCore::MsgDeleteFeature&) cmd;
|
||||
deleteFeature(notif.getFeatureSetIndex(), notif.getFeatureIndex());
|
||||
deleteFeature(0, notif.getFeatureIndex());
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgApplySettings::match(cmd))
|
||||
|
|
|
@ -1381,37 +1381,6 @@ paths:
|
|||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/deviceset/{deviceSetIndex}/focus:
|
||||
x-swagger-router-controller: deviceset
|
||||
patch:
|
||||
description: Set focus on device set (GUI only)
|
||||
operationId: devicesetFocusPatch
|
||||
tags:
|
||||
- DeviceSet
|
||||
parameters:
|
||||
- in: path
|
||||
name: deviceSetIndex
|
||||
type: integer
|
||||
required: true
|
||||
description: Index of device set in the device set list
|
||||
responses:
|
||||
"202":
|
||||
description: Message to focus on device set was sent successfully
|
||||
schema:
|
||||
$ref: "#/definitions/SuccessResponse"
|
||||
"400":
|
||||
description: Unsupported (srver instance)
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"404":
|
||||
description: Invalid index
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"500":
|
||||
$ref: "#/responses/Response_500"
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings:
|
||||
x-swagger-router-controller: deviceset
|
||||
get:
|
||||
|
|
|
@ -14552,9 +14552,6 @@ margin-bottom: 20px;
|
|||
<li data-group="DeviceSet" data-name="devicesetDeviceWorkspacePut" class="">
|
||||
<a href="#api-DeviceSet-devicesetDeviceWorkspacePut">devicesetDeviceWorkspacePut</a>
|
||||
</li>
|
||||
<li data-group="DeviceSet" data-name="devicesetFocusPatch" class="">
|
||||
<a href="#api-DeviceSet-devicesetFocusPatch">devicesetFocusPatch</a>
|
||||
</li>
|
||||
<li data-group="DeviceSet" data-name="devicesetGet" class="">
|
||||
<a href="#api-DeviceSet-devicesetGet">devicesetGet</a>
|
||||
</li>
|
||||
|
@ -26686,467 +26683,6 @@ $(document).ready(function() {
|
|||
</article>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="api-DeviceSet-devicesetFocusPatch">
|
||||
<article id="api-DeviceSet-devicesetFocusPatch-0" data-group="User" data-name="devicesetFocusPatch" data-version="0">
|
||||
<div class="pull-left">
|
||||
<h1>devicesetFocusPatch</h1>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="pull-right"></div>
|
||||
<div class="clearfix"></div>
|
||||
<p></p>
|
||||
<p class="marked">Set focus on device set (GUI only)</p>
|
||||
<p></p>
|
||||
<br />
|
||||
<pre class="prettyprint language-html prettyprinted" data-type="patch"><code><span class="pln">/sdrangel/deviceset/{deviceSetIndex}/focus</span></code></pre>
|
||||
<p>
|
||||
<h3>Usage and SDK Samples</h3>
|
||||
</p>
|
||||
<ul class="nav nav-tabs nav-tabs-examples">
|
||||
<li class="active"><a href="#examples-DeviceSet-devicesetFocusPatch-0-curl">Curl</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-java">Java</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-android">Android</a></li>
|
||||
<!--<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-groovy">Groovy</a></li>-->
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-objc">Obj-C</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-javascript">JavaScript</a></li>
|
||||
<!--<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-angular">Angular</a></li>-->
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-csharp">C#</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-php">PHP</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-perl">Perl</a></li>
|
||||
<li class=""><a href="#examples-DeviceSet-devicesetFocusPatch-0-python">Python</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="examples-DeviceSet-devicesetFocusPatch-0-curl">
|
||||
<pre class="prettyprint"><code class="language-bsh">curl -X PATCH "http://localhost/sdrangel/deviceset/{deviceSetIndex}/focus"</code></pre>
|
||||
</div>
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-java">
|
||||
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.*;
|
||||
import SWGSDRangel.auth.*;
|
||||
import SWGSDRangel.model.*;
|
||||
import SWGSDRangel.api.DeviceSetApi;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
public class DeviceSetApiExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
DeviceSetApi apiInstance = new DeviceSetApi();
|
||||
Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
|
||||
try {
|
||||
SuccessResponse result = apiInstance.devicesetFocusPatch(deviceSetIndex);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling DeviceSetApi#devicesetFocusPatch");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-android">
|
||||
<pre class="prettyprint"><code class="language-java">import SWGSDRangel.api.DeviceSetApi;
|
||||
|
||||
public class DeviceSetApiExample {
|
||||
|
||||
public static void main(String[] args) {
|
||||
DeviceSetApi apiInstance = new DeviceSetApi();
|
||||
Integer deviceSetIndex = 56; // Integer | Index of device set in the device set list
|
||||
try {
|
||||
SuccessResponse result = apiInstance.devicesetFocusPatch(deviceSetIndex);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling DeviceSetApi#devicesetFocusPatch");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
<!--
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-groovy">
|
||||
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
|
||||
</div> -->
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-objc">
|
||||
<pre class="prettyprint"><code class="language-cpp">Integer *deviceSetIndex = 56; // Index of device set in the device set list
|
||||
|
||||
DeviceSetApi *apiInstance = [[DeviceSetApi alloc] init];
|
||||
|
||||
[apiInstance devicesetFocusPatchWith:deviceSetIndex
|
||||
completionHandler: ^(SuccessResponse output, NSError* error) {
|
||||
if (output) {
|
||||
NSLog(@"%@", output);
|
||||
}
|
||||
if (error) {
|
||||
NSLog(@"Error: %@", error);
|
||||
}
|
||||
}];
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-javascript">
|
||||
<pre class="prettyprint"><code class="language-js">var SdRangel = require('sd_rangel');
|
||||
|
||||
var api = new SdRangel.DeviceSetApi()
|
||||
|
||||
var deviceSetIndex = 56; // {Integer} Index of device set in the device set list
|
||||
|
||||
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
} else {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
}
|
||||
};
|
||||
api.devicesetFocusPatch(deviceSetIndex, callback);
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<!--<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-angular">
|
||||
<pre class="prettyprint language-json prettyprinted" data-type="json"><code>Coming Soon!</code></pre>
|
||||
</div>-->
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-csharp">
|
||||
<pre class="prettyprint"><code class="language-cs">using System;
|
||||
using System.Diagnostics;
|
||||
using SWGSDRangel.Api;
|
||||
using SWGSDRangel.Client;
|
||||
using SWGSDRangel.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class devicesetFocusPatchExample
|
||||
{
|
||||
public void main()
|
||||
{
|
||||
|
||||
var apiInstance = new DeviceSetApi();
|
||||
var deviceSetIndex = 56; // Integer | Index of device set in the device set list
|
||||
|
||||
try
|
||||
{
|
||||
SuccessResponse result = apiInstance.devicesetFocusPatch(deviceSetIndex);
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print("Exception when calling DeviceSetApi.devicesetFocusPatch: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-php">
|
||||
<pre class="prettyprint"><code class="language-php"><?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
$api_instance = new Swagger\Client\Api\DeviceSetApi();
|
||||
$deviceSetIndex = 56; // Integer | Index of device set in the device set list
|
||||
|
||||
try {
|
||||
$result = $api_instance->devicesetFocusPatch($deviceSetIndex);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling DeviceSetApi->devicesetFocusPatch: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
?></code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-perl">
|
||||
<pre class="prettyprint"><code class="language-perl">use Data::Dumper;
|
||||
use SWGSDRangel::Configuration;
|
||||
use SWGSDRangel::DeviceSetApi;
|
||||
|
||||
my $api_instance = SWGSDRangel::DeviceSetApi->new();
|
||||
my $deviceSetIndex = 56; # Integer | Index of device set in the device set list
|
||||
|
||||
eval {
|
||||
my $result = $api_instance->devicesetFocusPatch(deviceSetIndex => $deviceSetIndex);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling DeviceSetApi->devicesetFocusPatch: $@\n";
|
||||
}</code></pre>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="examples-DeviceSet-devicesetFocusPatch-0-python">
|
||||
<pre class="prettyprint"><code class="language-python">from __future__ import print_statement
|
||||
import time
|
||||
import swagger_sdrangel
|
||||
from swagger_sdrangel.rest import ApiException
|
||||
from pprint import pprint
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = swagger_sdrangel.DeviceSetApi()
|
||||
deviceSetIndex = 56 # Integer | Index of device set in the device set list
|
||||
|
||||
try:
|
||||
api_response = api_instance.deviceset_focus_patch(deviceSetIndex)
|
||||
pprint(api_response)
|
||||
except ApiException as e:
|
||||
print("Exception when calling DeviceSetApi->devicesetFocusPatch: %s\n" % e)</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Parameters</h2>
|
||||
|
||||
<div class="methodsubtabletitle">Path parameters</div>
|
||||
<table id="methodsubtable">
|
||||
<tr>
|
||||
<th width="150px">Name</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr><td style="width:150px;">deviceSetIndex*</td>
|
||||
<td>
|
||||
|
||||
|
||||
<div id="d2e199_devicesetFocusPatch_deviceSetIndex">
|
||||
<div class="json-schema-view">
|
||||
<div class="primitive">
|
||||
<span class="type">
|
||||
Integer
|
||||
</span>
|
||||
|
||||
<div class="inner description">
|
||||
Index of device set in the device set list
|
||||
</div>
|
||||
</div>
|
||||
<div class="inner required">
|
||||
Required
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Responses</h2>
|
||||
<h3> Status: 202 - Message to focus on device set was sent successfully </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-202-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-202-schema">
|
||||
<div id='responses-devicesetFocusPatch-202-schema-202' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Message to focus on device set was sent successfully",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/SuccessResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-202-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-202-schema-202');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-202-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3> Status: 400 - Unsupported (srver instance) </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-400-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-400-schema">
|
||||
<div id='responses-devicesetFocusPatch-400-schema-400' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Unsupported (srver instance)",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/ErrorResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-400-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-400-schema-400');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-400-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3> Status: 404 - Invalid index </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-404-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-404-schema">
|
||||
<div id='responses-devicesetFocusPatch-404-schema-404' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Invalid index",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/ErrorResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-404-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-404-schema-404');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-404-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3> Status: 500 - Error </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-500-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-500-schema">
|
||||
<div id='responses-devicesetFocusPatch-500-schema-500' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Error",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/ErrorResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-500-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-500-schema-500');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-500-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3> Status: 501 - Function not implemented </h3>
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-examples" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#responses-devicesetFocusPatch-501-schema">Schema</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" style='margin-bottom: 10px;'>
|
||||
<div class="tab-pane active" id="responses-devicesetFocusPatch-501-schema">
|
||||
<div id='responses-devicesetFocusPatch-501-schema-501' style="padding: 30px; border-left: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;">
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var schemaWrapper = {
|
||||
"description" : "Function not implemented",
|
||||
"schema" : {
|
||||
"$ref" : "#/definitions/ErrorResponse"
|
||||
}
|
||||
};
|
||||
var schema = schemaWrapper.schema;
|
||||
if (schema.$ref != null) {
|
||||
schema = defsParser.$refs.get(schema.$ref);
|
||||
} else {
|
||||
schemaWrapper.definitions = Object.assign({}, defs);
|
||||
$RefParser.dereference(schemaWrapper).catch(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
|
||||
//console.log(JSON.stringify(schema));
|
||||
var view = new JSONSchemaView(schema, 3);
|
||||
$('#responses-devicesetFocusPatch-501-schema-data').val(stringify(schema));
|
||||
var result = $('#responses-devicesetFocusPatch-501-schema-501');
|
||||
result.empty();
|
||||
result.append(view.render());
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<input id='responses-devicesetFocusPatch-501-schema-data' type='hidden' value=''></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</div>
|
||||
<hr>
|
||||
<div id="api-DeviceSet-devicesetGet">
|
||||
<article id="api-DeviceSet-devicesetGet-0" data-group="User" data-name="devicesetGet" data-version="0">
|
||||
<div class="pull-left">
|
||||
|
@ -60155,7 +59691,7 @@ except ApiException as e:
|
|||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2022-05-14T13:17:30.416+02:00
|
||||
Generated 2022-05-16T19:55:17.622+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1388,60 +1388,6 @@ SWGDeviceSetApi::devicesetDeviceWorkspacePutCallback(SWGHttpRequestWorker * work
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetFocusPatch(qint32 device_set_index) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/focus");
|
||||
|
||||
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
||||
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
||||
|
||||
|
||||
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
|
||||
SWGHttpRequestInput input(fullPath, "PATCH");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach(QString key, this->defaultHeaders.keys()) {
|
||||
input.headers.insert(key, this->defaultHeaders.value(key));
|
||||
}
|
||||
|
||||
connect(worker,
|
||||
&SWGHttpRequestWorker::on_execution_finished,
|
||||
this,
|
||||
&SWGDeviceSetApi::devicesetFocusPatchCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetFocusPatchCallback(SWGHttpRequestWorker * worker) {
|
||||
QString msg;
|
||||
QString error_str = worker->error_str;
|
||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
msg = QString("Success! %1 bytes").arg(worker->response.length());
|
||||
}
|
||||
else {
|
||||
msg = "Error: " + worker->error_str;
|
||||
}
|
||||
|
||||
|
||||
QString json(worker->response);
|
||||
SWGSuccessResponse* output = static_cast<SWGSuccessResponse*>(create(json, QString("SWGSuccessResponse")));
|
||||
worker->deleteLater();
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
emit devicesetFocusPatchSignal(output);
|
||||
} else {
|
||||
emit devicesetFocusPatchSignalE(output, error_type, error_str);
|
||||
emit devicesetFocusPatchSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetGet(qint32 device_set_index) {
|
||||
QString fullPath;
|
||||
|
|
|
@ -71,7 +71,6 @@ public:
|
|||
void devicesetDeviceSubsystemRunPost(qint32 device_set_index, qint32 subsystem_index, SWGDeviceSettings& body);
|
||||
void devicesetDeviceWorkspaceGet(qint32 device_set_index);
|
||||
void devicesetDeviceWorkspacePut(qint32 device_set_index, SWGWorkspaceInfo& body);
|
||||
void devicesetFocusPatch(qint32 device_set_index);
|
||||
void devicesetGet(qint32 device_set_index);
|
||||
void devicesetSpectrumServerDelete(qint32 device_set_index);
|
||||
void devicesetSpectrumServerGet(qint32 device_set_index);
|
||||
|
@ -109,7 +108,6 @@ private:
|
|||
void devicesetDeviceSubsystemRunPostCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetDeviceWorkspaceGetCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetDeviceWorkspacePutCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetFocusPatchCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetGetCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetSpectrumServerDeleteCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetSpectrumServerGetCallback (SWGHttpRequestWorker * worker);
|
||||
|
@ -147,7 +145,6 @@ signals:
|
|||
void devicesetDeviceSubsystemRunPostSignal(SWGDeviceState* summary);
|
||||
void devicesetDeviceWorkspaceGetSignal(SWGWorkspaceInfo* summary);
|
||||
void devicesetDeviceWorkspacePutSignal(SWGSuccessResponse* summary);
|
||||
void devicesetFocusPatchSignal(SWGSuccessResponse* summary);
|
||||
void devicesetGetSignal(SWGDeviceSet* summary);
|
||||
void devicesetSpectrumServerDeleteSignal(SWGSuccessResponse* summary);
|
||||
void devicesetSpectrumServerGetSignal(SWGSpectrumServer* summary);
|
||||
|
@ -184,7 +181,6 @@ signals:
|
|||
void devicesetDeviceSubsystemRunPostSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetDeviceWorkspaceGetSignalE(SWGWorkspaceInfo* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetDeviceWorkspacePutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetFocusPatchSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetGetSignalE(SWGDeviceSet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerDeleteSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerGetSignalE(SWGSpectrumServer* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
|
@ -221,7 +217,6 @@ signals:
|
|||
void devicesetDeviceSubsystemRunPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetDeviceWorkspaceGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetDeviceWorkspacePutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetFocusPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
|
|
Ładowanie…
Reference in New Issue