mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-06-24 21:15:24 -04:00
Local sink: implemented play toggle REST API
This commit is contained in:
parent
ef85977682
commit
4399f6b537
@ -429,6 +429,9 @@ void LocalSink::webapiUpdateChannelSettings(
|
|||||||
validateFilterChainHash(settings);
|
validateFilterChainHash(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (channelSettingsKeys.contains("play")) {
|
||||||
|
settings.m_play = response.getLocalSinkSettings()->getPlay() != 0;
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("streamIndex")) {
|
if (channelSettingsKeys.contains("streamIndex")) {
|
||||||
settings.m_streamIndex = response.getLocalSinkSettings()->getStreamIndex();
|
settings.m_streamIndex = response.getLocalSinkSettings()->getStreamIndex();
|
||||||
}
|
}
|
||||||
@ -462,6 +465,7 @@ void LocalSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
|
|||||||
|
|
||||||
response.getLocalSinkSettings()->setLog2Decim(settings.m_log2Decim);
|
response.getLocalSinkSettings()->setLog2Decim(settings.m_log2Decim);
|
||||||
response.getLocalSinkSettings()->setFilterChainHash(settings.m_filterChainHash);
|
response.getLocalSinkSettings()->setFilterChainHash(settings.m_filterChainHash);
|
||||||
|
response.getLocalSinkSettings()->setPlay(settings.m_play ? 1 : 0);
|
||||||
response.getLocalSinkSettings()->setStreamIndex(settings.m_streamIndex);
|
response.getLocalSinkSettings()->setStreamIndex(settings.m_streamIndex);
|
||||||
response.getLocalSinkSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
response.getLocalSinkSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||||
|
|
||||||
@ -503,6 +507,9 @@ void LocalSink::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, c
|
|||||||
if (channelSettingsKeys.contains("filterChainHash") || force) {
|
if (channelSettingsKeys.contains("filterChainHash") || force) {
|
||||||
swgLocalSinkSettings->setFilterChainHash(settings.m_filterChainHash);
|
swgLocalSinkSettings->setFilterChainHash(settings.m_filterChainHash);
|
||||||
}
|
}
|
||||||
|
if (channelSettingsKeys.contains("play") || force) {
|
||||||
|
swgLocalSinkSettings->setPlay(settings.m_play ? 1 : 0);
|
||||||
|
}
|
||||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||||
swgLocalSinkSettings->setStreamIndex(settings.m_streamIndex);
|
swgLocalSinkSettings->setStreamIndex(settings.m_streamIndex);
|
||||||
}
|
}
|
||||||
|
@ -193,6 +193,13 @@ void LocalSinkGUI::displaySettings()
|
|||||||
setWindowTitle(m_channelMarker.getTitle());
|
setWindowTitle(m_channelMarker.getTitle());
|
||||||
|
|
||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
|
int index = getLocalDeviceIndexInCombo(m_settings.m_localDeviceIndex);
|
||||||
|
|
||||||
|
if (index >= 0) {
|
||||||
|
ui->localDevice->setCurrentIndex(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->localDevicePlay->setChecked(m_settings.m_play);
|
||||||
ui->decimationFactor->setCurrentIndex(m_settings.m_log2Decim);
|
ui->decimationFactor->setCurrentIndex(m_settings.m_log2Decim);
|
||||||
applyDecimation();
|
applyDecimation();
|
||||||
displayStreamIndex();
|
displayStreamIndex();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user