1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 15:34:57 -04:00

Freq Scanner: Don't unmute manually muted channels. #2636

This commit is contained in:
Jon Beniston
2026-02-12 09:36:55 +00:00
parent c45b8f59fa
commit 8e55a8c4e6
6 changed files with 129 additions and 10 deletions
+32
View File
@@ -966,6 +966,38 @@ bool ChannelWebAPIUtils::setFrequencyOffset(unsigned int deviceIndex, int channe
return false;
}
bool ChannelWebAPIUtils::getAudioMute(unsigned int deviceIndex, int channelIndex, bool& mute)
{
SWGSDRangel::SWGChannelSettings channelSettingsResponse;
QString errorResponse;
int httpRC;
QJsonObject* jsonObj;
ChannelAPI* channel = MainCore::instance()->getChannel(deviceIndex, channelIndex);
if (channel != nullptr)
{
httpRC = channel->webapiSettingsGet(channelSettingsResponse, errorResponse);
if (httpRC / 100 != 2)
{
qWarning("ChannelWebAPIUtils::getAudioMute: get channel settings error %d: %s",
httpRC, qPrintable(errorResponse));
return false;
}
jsonObj = channelSettingsResponse.asJsonObject();
int muteInt;
if (WebAPIUtils::getSubObjectInt(*jsonObj, "audioMute", muteInt))
{
mute = (bool) muteInt;
delete jsonObj;
return true;
}
delete jsonObj;
}
return false;
}
bool ChannelWebAPIUtils::setAudioMute(unsigned int deviceIndex, int channelIndex, bool mute)
{
SWGSDRangel::SWGChannelSettings channelSettingsResponse;