mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-08-03 14:32:25 -04:00
Local source: implemented play toggle REST API
This commit is contained in:
parent
6ea3356371
commit
ef85977682
@ -386,6 +386,9 @@ void LocalSource::webapiUpdateChannelSettings(
|
|||||||
validateFilterChainHash(settings);
|
validateFilterChainHash(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (channelSettingsKeys.contains("play")) {
|
||||||
|
settings.m_play = response.getLocalSourceSettings()->getPlay() != 0;
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||||
settings.m_useReverseAPI = response.getLocalSourceSettings()->getUseReverseApi() != 0;
|
settings.m_useReverseAPI = response.getLocalSourceSettings()->getUseReverseApi() != 0;
|
||||||
}
|
}
|
||||||
@ -419,6 +422,7 @@ void LocalSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
|
|||||||
|
|
||||||
response.getLocalSourceSettings()->setLog2Interp(settings.m_log2Interp);
|
response.getLocalSourceSettings()->setLog2Interp(settings.m_log2Interp);
|
||||||
response.getLocalSourceSettings()->setFilterChainHash(settings.m_filterChainHash);
|
response.getLocalSourceSettings()->setFilterChainHash(settings.m_filterChainHash);
|
||||||
|
response.getLocalSourceSettings()->setPlay(settings.m_play ? 1 : 0);
|
||||||
response.getLocalSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
response.getLocalSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||||
|
|
||||||
if (response.getLocalSourceSettings()->getReverseApiAddress()) {
|
if (response.getLocalSourceSettings()->getReverseApiAddress()) {
|
||||||
@ -459,6 +463,9 @@ void LocalSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys,
|
|||||||
if (channelSettingsKeys.contains("filterChainHash") || force) {
|
if (channelSettingsKeys.contains("filterChainHash") || force) {
|
||||||
swgLocalSourceSettings->setFilterChainHash(settings.m_filterChainHash);
|
swgLocalSourceSettings->setFilterChainHash(settings.m_filterChainHash);
|
||||||
}
|
}
|
||||||
|
if (channelSettingsKeys.contains("play") || force) {
|
||||||
|
swgLocalSourceSettings->setPlay(settings.m_play ? 1 : 0);
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||||
swgLocalSourceSettings->setRgbColor(settings.m_streamIndex);
|
swgLocalSourceSettings->setRgbColor(settings.m_streamIndex);
|
||||||
}
|
}
|
||||||
|
@ -184,6 +184,7 @@ void LocalSourceGUI::displaySettings()
|
|||||||
|
|
||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
ui->interpolationFactor->setCurrentIndex(m_settings.m_log2Interp);
|
ui->interpolationFactor->setCurrentIndex(m_settings.m_log2Interp);
|
||||||
|
ui->localDevicePlay->setChecked(m_settings.m_play);
|
||||||
applyInterpolation();
|
applyInterpolation();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user