mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
Add Channel Power to Web API
This commit is contained in:
parent
ddcd08ba15
commit
d45058d08f
@ -94,6 +94,7 @@ option(ENABLE_CHANNELRX_DEMODDSC "Enable channelrx demoddsc plugin" ON)
|
||||
option(ENABLE_CHANNELRX_HEATMAP "Enable channelrx heatmap plugin" ON)
|
||||
option(ENABLE_CHANNELRX_FREQSCANNER "Enable channelrx freqscanner plugin" ON)
|
||||
option(ENABLE_CHANNELRX_ENDOFTRAIN "Enable channelrx end-of-train plugin" ON)
|
||||
option(ENABLE_CHANNELRX_CHANNELPOWER "Enable channelrx channel power plugin" ON)
|
||||
|
||||
# Channel Tx enablers
|
||||
option(ENABLE_CHANNELTX "Enable channeltx plugins" ON)
|
||||
|
@ -1,5 +1,9 @@
|
||||
project(demod)
|
||||
|
||||
if (ENABLE_CHANNELRX_CHANNELPOWER)
|
||||
add_subdirectory(channelpower)
|
||||
endif()
|
||||
|
||||
if (ENABLE_CHANNELRX_ENDOFTRAIN)
|
||||
add_subdirectory(demodendoftrain)
|
||||
endif()
|
||||
|
@ -421,6 +421,7 @@ void ChannelPower::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& resp
|
||||
response.getChannelPowerReport()->setChannelPowerDb(CalcDb::dbPower(magAvg));
|
||||
response.getChannelPowerReport()->setChannelPowerMaxDb(CalcDb::dbPower(magMaxPeak));
|
||||
response.getChannelPowerReport()->setChannelPowerMinDb(CalcDb::dbPower(magMinPeak));
|
||||
response.getChannelPowerReport()->setChannelPowerPulseDb(CalcDb::dbPower(magPulseAvg));
|
||||
response.getChannelPowerReport()->setChannelSampleRate(m_basebandSink->getChannelSampleRate());
|
||||
}
|
||||
|
||||
|
@ -4478,6 +4478,12 @@ bool WebAPIRequestMapper::getChannelSettings(
|
||||
channelSettings->getChannelAnalyzerSettings()->init();
|
||||
channelSettings->getChannelAnalyzerSettings()->fromJsonObject(settingsJsonObject);
|
||||
}
|
||||
else if (channelSettingsKey == "ChannelPowerSettings")
|
||||
{
|
||||
channelSettings->setChannelPowerSettings(new SWGSDRangel::SWGChannelPowerSettings());
|
||||
channelSettings->setChannelPowerSettings()->init();
|
||||
channelSettings->setChannelPowerSettings()->fromJsonObject(settingsJsonObject);
|
||||
}
|
||||
else if (channelSettingsKey == "ChirpChatDemodSettings")
|
||||
{
|
||||
channelSettings->setChirpChatDemodSettings(new SWGSDRangel::SWGChirpChatDemodSettings());
|
||||
@ -5526,6 +5532,7 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings&
|
||||
channelSettings.setAptDemodSettings(nullptr);
|
||||
channelSettings.setAtvModSettings(nullptr);
|
||||
channelSettings.setBfmDemodSettings(nullptr);
|
||||
channelSettings.setChannelPowerSettings(nullptr);
|
||||
channelSettings.setDatvModSettings(nullptr);
|
||||
channelSettings.setDabDemodSettings(nullptr);
|
||||
channelSettings.setDsdDemodSettings(nullptr);
|
||||
@ -5572,6 +5579,7 @@ void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& chan
|
||||
channelReport.setAmModReport(nullptr);
|
||||
channelReport.setAtvModReport(nullptr);
|
||||
channelReport.setBfmDemodReport(nullptr);
|
||||
channelReport.setChannelPowerReport(nullptr);
|
||||
channelReport.setDatvModReport(nullptr);
|
||||
channelReport.setDsdDemodReport(nullptr);
|
||||
channelReport.setEndOfTrainDemodReport(nullptr);
|
||||
|
@ -33,6 +33,7 @@ const QMap<QString, QString> WebAPIUtils::m_channelURIToSettingsKey = {
|
||||
{"sdrangel.channeltx.moddatv", "DATVModSettings"},
|
||||
{"sdrangel.channel.bfm", "BFMDemodSettings"},
|
||||
{"sdrangel.channel.chanalyzer", "ChannelAnalyzerSettings"},
|
||||
{"sdrangel.channel.channelpower", "ChannelPowerSettings"},
|
||||
{"sdrangel.channel.chanalyzerng", "ChannelAnalyzerSettings"}, // remap
|
||||
{"org.f4exb.sdrangelove.channel.chanalyzer", "ChannelAnalyzerSettings"}, // remap
|
||||
{"sdrangel.channel.chirpchatdemod", "ChirpChatDemodSettings"},
|
||||
@ -160,6 +161,7 @@ const QMap<QString, QString> WebAPIUtils::m_channelTypeToSettingsKey = {
|
||||
{"ChannelAnalyzer", "ChannelAnalyzerSettings"},
|
||||
{"ChirpChatDemod", "ChirpChatDemodSettings"},
|
||||
{"ChirpChatMod", "ChirpChatModSettings"},
|
||||
{"ChannelPower", "ChannelPowerSettings"},
|
||||
{"DATVDemod", "DATVDemodSettings"},
|
||||
{"DATVMod", "DATVModSettings"},
|
||||
{"DABDemod", "DABDemodSettings"},
|
||||
|
Loading…
Reference in New Issue
Block a user