mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05: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);
|
||||
}
|
||||
|
||||
if (channelSettingsKeys.contains("play")) {
|
||||
settings.m_play = response.getLocalSourceSettings()->getPlay() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
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()->setFilterChainHash(settings.m_filterChainHash);
|
||||
response.getLocalSourceSettings()->setPlay(settings.m_play ? 1 : 0);
|
||||
response.getLocalSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
if (response.getLocalSourceSettings()->getReverseApiAddress()) {
|
||||
@ -459,6 +463,9 @@ void LocalSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys,
|
||||
if (channelSettingsKeys.contains("filterChainHash") || force) {
|
||||
swgLocalSourceSettings->setFilterChainHash(settings.m_filterChainHash);
|
||||
}
|
||||
if (channelSettingsKeys.contains("play") || force) {
|
||||
swgLocalSourceSettings->setPlay(settings.m_play ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgLocalSourceSettings->setRgbColor(settings.m_streamIndex);
|
||||
}
|
||||
|
@ -184,6 +184,7 @@ void LocalSourceGUI::displaySettings()
|
||||
|
||||
blockApplySettings(true);
|
||||
ui->interpolationFactor->setCurrentIndex(m_settings.m_log2Interp);
|
||||
ui->localDevicePlay->setChecked(m_settings.m_play);
|
||||
applyInterpolation();
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user