mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 17:45:48 -05:00
FreeDV: REST API fixes (1)
This commit is contained in:
parent
aefb1b7f3f
commit
c76adfc1a8
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -1,6 +1,8 @@
|
||||
sdrangel (4.5.5-1) unstable; urgency=medium
|
||||
|
||||
* Fixed HackRF Fc pos setting from REST API.
|
||||
* FreeDV: fixes in REST API
|
||||
* LimeSDR: fixed Rx and Tx antenna labels for Lime mini
|
||||
* HackRF output: fixed setting of Fc pos from REST API
|
||||
|
||||
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sat, 20 Apr 2019 20:14:18 +0100
|
||||
|
||||
|
@ -873,6 +873,7 @@ void FreeDVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
|
||||
response.getFreeDvDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
|
||||
response.getFreeDvDemodSettings()->setAgc(settings.m_agc ? 1 : 0);
|
||||
response.getFreeDvDemodSettings()->setRgbColor(settings.m_rgbColor);
|
||||
response.getFreeDvDemodSettings()->setFreeDvMode((int) settings.m_freeDVMode);
|
||||
|
||||
if (response.getFreeDvDemodSettings()->getTitle()) {
|
||||
*response.getFreeDvDemodSettings()->getTitle() = settings.m_title;
|
||||
|
@ -337,11 +337,18 @@ void FreeDVDemodGUI::applySettings(bool force)
|
||||
}
|
||||
|
||||
void FreeDVDemodGUI::applyBandwidths(int spanLog2, bool force)
|
||||
{
|
||||
displayBandwidths(m_settings.m_spanLog2);
|
||||
m_settings.m_spanLog2 = spanLog2;
|
||||
applySettings(force);
|
||||
}
|
||||
|
||||
void FreeDVDemodGUI::displayBandwidths(int spanLog2)
|
||||
{
|
||||
m_spectrumRate = m_freeDVDemod->getModemSampleRate() / (1<<spanLog2);
|
||||
int bwMax = m_freeDVDemod->getModemSampleRate() / (100*(1<<spanLog2));
|
||||
|
||||
qDebug() << "FreeDVDemodGUI::applyBandwidths:"
|
||||
qDebug() << "FreeDVDemodGUI::displayBandwidths:"
|
||||
<< " spanLog2: " << spanLog2
|
||||
<< " m_spectrumRate: " << m_spectrumRate
|
||||
<< " bwMax: " << bwMax;
|
||||
@ -353,10 +360,6 @@ void FreeDVDemodGUI::applyBandwidths(int spanLog2, bool force)
|
||||
ui->glSpectrum->setSampleRate(m_spectrumRate);
|
||||
ui->glSpectrum->setSsbSpectrum(true);
|
||||
ui->glSpectrum->setLsbDisplay(false);
|
||||
|
||||
m_settings.m_spanLog2 = spanLog2;
|
||||
|
||||
applySettings(force);
|
||||
}
|
||||
|
||||
void FreeDVDemodGUI::displaySettings()
|
||||
@ -375,8 +378,7 @@ void FreeDVDemodGUI::displaySettings()
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||
|
||||
ui->freeDVMode->setCurrentIndex((int) m_settings.m_freeDVMode);
|
||||
ui->agc->setChecked(m_settings.m_agc);
|
||||
ui->audioMute->setChecked(m_settings.m_audioMute);
|
||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||
@ -384,6 +386,7 @@ void FreeDVDemodGUI::displaySettings()
|
||||
// Prevent uncontrolled triggering of applyBandwidths
|
||||
ui->spanLog2->blockSignals(true);
|
||||
ui->spanLog2->setValue(5 - m_settings.m_spanLog2);
|
||||
displayBandwidths(m_settings.m_spanLog2);
|
||||
ui->spanLog2->blockSignals(false);
|
||||
|
||||
ui->volume->setValue(m_settings.m_volume * 10.0);
|
||||
|
@ -88,6 +88,7 @@ private:
|
||||
bool blockApplySettings(bool block);
|
||||
void applySettings(bool force = false);
|
||||
void applyBandwidths(int spanLog2, bool force = false);
|
||||
void displayBandwidths(int spanLog2);
|
||||
void displaySettings();
|
||||
|
||||
void leaveEvent(QEvent*);
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
const PluginDescriptor FreeDVPlugin::m_pluginDescriptor = {
|
||||
QString("FreeDV Demodulator"),
|
||||
QString("4.5.2"),
|
||||
QString("4.5.5"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -996,6 +996,7 @@ void FreeDVMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
|
||||
}
|
||||
|
||||
response.getFreeDvModSettings()->setModAfInput((int) settings.m_modAFInput);
|
||||
response.getFreeDvModSettings()->setFreeDvMode((int) settings.m_freeDVMode);
|
||||
|
||||
if (response.getFreeDvModSettings()->getAudioDeviceName()) {
|
||||
*response.getFreeDvModSettings()->getAudioDeviceName() = settings.m_audioDeviceName;
|
||||
|
@ -422,11 +422,18 @@ void FreeDVModGUI::applySettings(bool force)
|
||||
}
|
||||
|
||||
void FreeDVModGUI::applyBandwidths(int spanLog2, bool force)
|
||||
{
|
||||
displayBandwidths(spanLog2);
|
||||
m_settings.m_spanLog2 = spanLog2;
|
||||
applySettings(force);
|
||||
}
|
||||
|
||||
void FreeDVModGUI::displayBandwidths(int spanLog2)
|
||||
{
|
||||
m_spectrumRate = m_freeDVMod->getModemSampleRate() / (1<<spanLog2);
|
||||
int bwMax = m_freeDVMod->getModemSampleRate() / (100*(1<<spanLog2));
|
||||
|
||||
qDebug() << "FreeDVModGUI::applyBandwidths:"
|
||||
qDebug() << "FreeDVModGUI::displayBandwidths:"
|
||||
<< " spanLog2: " << spanLog2
|
||||
<< " m_spectrumRate: " << m_spectrumRate
|
||||
<< " bwMax: " << bwMax;
|
||||
@ -438,10 +445,6 @@ void FreeDVModGUI::applyBandwidths(int spanLog2, bool force)
|
||||
ui->glSpectrum->setSampleRate(m_spectrumRate);
|
||||
ui->glSpectrum->setSsbSpectrum(true);
|
||||
ui->glSpectrum->setLsbDisplay(false);
|
||||
|
||||
m_settings.m_spanLog2 = spanLog2;
|
||||
|
||||
applySettings(force);
|
||||
}
|
||||
|
||||
void FreeDVModGUI::displaySettings()
|
||||
@ -460,12 +463,14 @@ void FreeDVModGUI::displaySettings()
|
||||
|
||||
blockApplySettings(true);
|
||||
|
||||
ui->freeDVMode->setCurrentIndex((int) m_settings.m_freeDVMode);
|
||||
ui->audioMute->setChecked(m_settings.m_audioMute);
|
||||
ui->playLoop->setChecked(m_settings.m_playLoop);
|
||||
|
||||
// Prevent uncontrolled triggering of applyBandwidths
|
||||
ui->spanLog2->blockSignals(true);
|
||||
ui->spanLog2->setValue(5 - m_settings.m_spanLog2);
|
||||
displayBandwidths(m_settings.m_spanLog2);
|
||||
ui->spanLog2->blockSignals(false);
|
||||
|
||||
ui->gaugeInput->setChecked(m_settings.m_gaugeInputElseModem);
|
||||
|
@ -86,6 +86,7 @@ private:
|
||||
bool blockApplySettings(bool block);
|
||||
void applySettings(bool force = false);
|
||||
void applyBandwidths(int spanLog2, bool force = false);
|
||||
void displayBandwidths(int spanLog2);
|
||||
void displaySettings();
|
||||
void updateWithStreamData();
|
||||
void updateWithStreamTime();
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
const PluginDescriptor FreeDVModPlugin::m_pluginDescriptor = {
|
||||
QString("FreeDV Modulator"),
|
||||
QString("4.5.2"),
|
||||
QString("4.5.5"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
|
@ -2238,6 +2238,34 @@ bool WebAPIRequestMapper::validateChannelSettings(
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (*channelType == "FreeDVDemod")
|
||||
{
|
||||
if (channelSettings.getTx() == 0)
|
||||
{
|
||||
QJsonObject freeDVDemodSettingsJsonObject = jsonObject["FreeDVDemodSettings"].toObject();
|
||||
channelSettingsKeys = freeDVDemodSettingsJsonObject.keys();
|
||||
channelSettings.setFreeDvDemodSettings(new SWGSDRangel::SWGFreeDVDemodSettings());
|
||||
channelSettings.getFreeDvDemodSettings()->fromJsonObject(freeDVDemodSettingsJsonObject);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (*channelType == "FreeDVMod")
|
||||
{
|
||||
if (channelSettings.getTx() != 0)
|
||||
{
|
||||
QJsonObject freeDVModSettingsJsonObject = jsonObject["FreeDVModSettings"].toObject();
|
||||
channelSettingsKeys = freeDVModSettingsJsonObject.keys();
|
||||
channelSettings.setFreeDvModSettings(new SWGSDRangel::SWGFreeDVModSettings());
|
||||
channelSettings.getFreeDvModSettings()->fromJsonObject(freeDVModSettingsJsonObject);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (*channelType == "NFMDemod")
|
||||
{
|
||||
if (channelSettings.getTx() == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user