mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
M17 mod: updated API and partially implemented solution for #1329
This commit is contained in:
parent
f47496645f
commit
2efa765750
@ -69,7 +69,7 @@ M17Mod::M17Mod(DeviceAPI *deviceAPI) :
|
||||
m_basebandSource->setChannel(this);
|
||||
m_basebandSource->moveToThread(m_thread);
|
||||
|
||||
applySettings(m_settings, true);
|
||||
applySettings(m_settings, QList<QString>(), true);
|
||||
|
||||
m_deviceAPI->addChannelSource(this);
|
||||
m_deviceAPI->addChannelSourceAPI(this);
|
||||
@ -137,13 +137,14 @@ void M17Mod::pull(SampleVector::iterator& begin, unsigned int nbSamples)
|
||||
|
||||
void M17Mod::setCenterFrequency(qint64 frequency)
|
||||
{
|
||||
M17ModSettings settings = m_settings;
|
||||
M17ModSettings settings;
|
||||
settings.m_inputFrequencyOffset = frequency;
|
||||
applySettings(settings, false);
|
||||
QList<QString> settingsKeys = QList<QString>{"inputFrequencyOffset"};
|
||||
applySettings(settings, settingsKeys, false);
|
||||
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigureM17Mod *msgToGUI = MsgConfigureM17Mod::create(settings, false);
|
||||
MsgConfigureM17Mod *msgToGUI = MsgConfigureM17Mod::create(settings, settingsKeys, false);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
}
|
||||
@ -154,8 +155,7 @@ bool M17Mod::handleMessage(const Message& cmd)
|
||||
{
|
||||
MsgConfigureM17Mod& cfg = (MsgConfigureM17Mod&) cmd;
|
||||
qDebug() << "M17Mod::handleMessage: MsgConfigureM17Mod";
|
||||
|
||||
applySettings(cfg.getSettings(), cfg.getForce());
|
||||
applySettings(cfg.getSettings(), cfg.getSettingsKeys(), cfg.getForce());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -291,9 +291,10 @@ void M17Mod::seekFileStream(int seekPercentage)
|
||||
}
|
||||
}
|
||||
|
||||
void M17Mod::applySettings(const M17ModSettings& settings, bool force)
|
||||
void M17Mod::applySettings(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force)
|
||||
{
|
||||
qDebug() << "M17Mod::applySettings:"
|
||||
<< " settingsKeys: " << settingsKeys
|
||||
<< " m_inputFrequencyOffset: " << settings.m_inputFrequencyOffset
|
||||
<< " m_rfBandwidth: " << settings.m_rfBandwidth
|
||||
<< " m_fmDeviation: " << settings.m_fmDeviation
|
||||
@ -312,55 +313,12 @@ void M17Mod::applySettings(const M17ModSettings& settings, bool force)
|
||||
<< " m_reverseAPIChannelIndex: " << settings.m_reverseAPIChannelIndex
|
||||
<< " force: " << force;
|
||||
|
||||
QList<QString> reverseAPIKeys;
|
||||
|
||||
if ((settings.m_inputFrequencyOffset != m_settings.m_inputFrequencyOffset) || force) {
|
||||
reverseAPIKeys.append("inputFrequencyOffset");
|
||||
}
|
||||
if ((settings.m_fmDeviation != m_settings.m_fmDeviation) || force) {
|
||||
reverseAPIKeys.append("fmDeviation");
|
||||
}
|
||||
if ((settings.m_volumeFactor != m_settings.m_volumeFactor) || force) {
|
||||
reverseAPIKeys.append("volumeFactor");
|
||||
}
|
||||
if ((settings.m_channelMute != m_settings.m_channelMute) || force) {
|
||||
reverseAPIKeys.append("channelMute");
|
||||
}
|
||||
if ((settings.m_playLoop != m_settings.m_playLoop) || force) {
|
||||
reverseAPIKeys.append("playLoop");
|
||||
}
|
||||
if ((settings.m_audioType != m_settings.m_audioType) || force) {
|
||||
reverseAPIKeys.append("audioType");
|
||||
}
|
||||
if ((settings.m_packetType != m_settings.m_packetType) || force) {
|
||||
reverseAPIKeys.append("packetType");
|
||||
}
|
||||
if ((settings.m_m17Mode != m_settings.m_m17Mode) || force) {
|
||||
reverseAPIKeys.append("m17Mode");
|
||||
}
|
||||
if((settings.m_rfBandwidth != m_settings.m_rfBandwidth) || force) {
|
||||
reverseAPIKeys.append("rfBandwidth");
|
||||
}
|
||||
if ((settings.m_toneFrequency != m_settings.m_toneFrequency) || force) {
|
||||
reverseAPIKeys.append("toneFrequency");
|
||||
}
|
||||
if ((settings.m_audioDeviceName != m_settings.m_audioDeviceName) || force) {
|
||||
reverseAPIKeys.append("audioDeviceName");
|
||||
}
|
||||
if ((settings.m_feedbackAudioDeviceName != m_settings.m_feedbackAudioDeviceName) || force) {
|
||||
reverseAPIKeys.append("feedbackAudioDeviceName");
|
||||
}
|
||||
|
||||
if ((settings.m_loopPacketInterval != m_settings.m_loopPacketInterval) || force)
|
||||
{
|
||||
reverseAPIKeys.append("loopPacketInterval");
|
||||
if (settingsKeys.contains("loopPacketInterval") || force) {
|
||||
m_loopPacketTimer.setInterval(settings.m_loopPacketInterval*1000);
|
||||
}
|
||||
|
||||
if ((settings.m_loopPacket != m_settings.m_loopPacket) || force)
|
||||
if (settingsKeys.contains("loopPacket") || force)
|
||||
{
|
||||
reverseAPIKeys.append("loopPacket");
|
||||
|
||||
if (settings.m_loopPacket) {
|
||||
m_loopPacketTimer.start(settings.m_loopPacketInterval*1000);
|
||||
} else {
|
||||
@ -368,7 +326,7 @@ void M17Mod::applySettings(const M17ModSettings& settings, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_settings.m_streamIndex != settings.m_streamIndex)
|
||||
if (settingsKeys.contains("streamIndex"))
|
||||
{
|
||||
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
|
||||
{
|
||||
@ -377,11 +335,9 @@ void M17Mod::applySettings(const M17ModSettings& settings, bool force)
|
||||
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
|
||||
m_deviceAPI->addChannelSourceAPI(this);
|
||||
}
|
||||
|
||||
reverseAPIKeys.append("streamIndex");
|
||||
}
|
||||
|
||||
M17ModBaseband::MsgConfigureM17ModBaseband *msg = M17ModBaseband::MsgConfigureM17ModBaseband::create(settings, force);
|
||||
M17ModBaseband::MsgConfigureM17ModBaseband *msg = M17ModBaseband::MsgConfigureM17ModBaseband::create(settings, settingsKeys, force);
|
||||
m_basebandSource->getInputMessageQueue()->push(msg);
|
||||
|
||||
if (settings.m_useReverseAPI)
|
||||
@ -391,17 +347,21 @@ void M17Mod::applySettings(const M17ModSettings& settings, bool force)
|
||||
(m_settings.m_reverseAPIPort != settings.m_reverseAPIPort) ||
|
||||
(m_settings.m_reverseAPIDeviceIndex != settings.m_reverseAPIDeviceIndex) ||
|
||||
(m_settings.m_reverseAPIChannelIndex != settings.m_reverseAPIChannelIndex);
|
||||
webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force);
|
||||
webapiReverseSendSettings(settingsKeys, settings, fullUpdate || force);
|
||||
}
|
||||
|
||||
QList<ObjectPipe*> pipes;
|
||||
MainCore::instance()->getMessagePipes().getMessagePipes(this, "settings", pipes);
|
||||
|
||||
if (pipes.size() > 0) {
|
||||
sendChannelSettings(pipes, reverseAPIKeys, settings, force);
|
||||
sendChannelSettings(pipes, settingsKeys, settings, force);
|
||||
}
|
||||
|
||||
if (force) {
|
||||
m_settings = settings;
|
||||
} else {
|
||||
m_settings.applySettings(settingsKeys, settings);
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray M17Mod::serialize() const
|
||||
@ -419,7 +379,7 @@ bool M17Mod::deserialize(const QByteArray& data)
|
||||
success = false;
|
||||
}
|
||||
|
||||
MsgConfigureM17Mod *msg = MsgConfigureM17Mod::create(m_settings, true);
|
||||
MsgConfigureM17Mod *msg = MsgConfigureM17Mod::create(m_settings, QList<QString>(), true);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
return success;
|
||||
@ -474,12 +434,12 @@ int M17Mod::webapiSettingsPutPatch(
|
||||
M17ModSettings settings = m_settings;
|
||||
webapiUpdateChannelSettings(settings, channelSettingsKeys, response);
|
||||
|
||||
MsgConfigureM17Mod *msg = MsgConfigureM17Mod::create(settings, force);
|
||||
MsgConfigureM17Mod *msg = MsgConfigureM17Mod::create(settings, channelSettingsKeys, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigureM17Mod *msgToGUI = MsgConfigureM17Mod::create(settings, force);
|
||||
MsgConfigureM17Mod *msgToGUI = MsgConfigureM17Mod::create(settings, channelSettingsKeys, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
@ -493,14 +453,32 @@ void M17Mod::webapiUpdateChannelSettings(
|
||||
const QStringList& channelSettingsKeys,
|
||||
SWGSDRangel::SWGChannelSettings& response)
|
||||
{
|
||||
if (channelSettingsKeys.contains("channelMute")) {
|
||||
settings.m_channelMute = response.getM17ModSettings()->getChannelMute() != 0;
|
||||
if (channelSettingsKeys.contains("inputFrequencyOffset")) {
|
||||
settings.m_inputFrequencyOffset = response.getM17ModSettings()->getInputFrequencyOffset();
|
||||
}
|
||||
if (channelSettingsKeys.contains("rfBandwidth")) {
|
||||
settings.m_rfBandwidth = response.getM17ModSettings()->getRfBandwidth();
|
||||
}
|
||||
if (channelSettingsKeys.contains("fmDeviation")) {
|
||||
settings.m_fmDeviation = response.getM17ModSettings()->getFmDeviation();
|
||||
}
|
||||
if (channelSettingsKeys.contains("inputFrequencyOffset")) {
|
||||
settings.m_inputFrequencyOffset = response.getM17ModSettings()->getInputFrequencyOffset();
|
||||
if (channelSettingsKeys.contains("toneFrequency")) {
|
||||
settings.m_toneFrequency = response.getM17ModSettings()->getToneFrequency();
|
||||
}
|
||||
if (channelSettingsKeys.contains("volumeFactor")) {
|
||||
settings.m_volumeFactor = response.getM17ModSettings()->getVolumeFactor();
|
||||
}
|
||||
if (channelSettingsKeys.contains("channelMute")) {
|
||||
settings.m_channelMute = response.getM17ModSettings()->getChannelMute() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("playLoop")) {
|
||||
settings.m_playLoop = response.getM17ModSettings()->getPlayLoop() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("rgbColor")) {
|
||||
settings.m_rgbColor = response.getM17ModSettings()->getRgbColor();
|
||||
}
|
||||
if (channelSettingsKeys.contains("title")) {
|
||||
settings.m_title = *response.getM17ModSettings()->getTitle();
|
||||
}
|
||||
if (channelSettingsKeys.contains("m17Mode")) {
|
||||
settings.m_m17Mode = (M17ModSettings::M17Mode) response.getM17ModSettings()->getM17Mode();
|
||||
@ -511,23 +489,17 @@ void M17Mod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("packetType")) {
|
||||
settings.m_packetType = (M17ModSettings::PacketType) response.getM17ModSettings()->getPacketType();
|
||||
}
|
||||
if (channelSettingsKeys.contains("playLoop")) {
|
||||
settings.m_playLoop = response.getM17ModSettings()->getPlayLoop() != 0;
|
||||
if (channelSettingsKeys.contains("audioDeviceName")) {
|
||||
settings.m_audioDeviceName = *response.getM17ModSettings()->getAudioDeviceName();
|
||||
}
|
||||
if (channelSettingsKeys.contains("rfBandwidth")) {
|
||||
settings.m_rfBandwidth = response.getM17ModSettings()->getRfBandwidth();
|
||||
if (channelSettingsKeys.contains("feedbackAudioDeviceName")) {
|
||||
settings.m_feedbackAudioDeviceName = *response.getM17ModSettings()->getFeedbackAudioDeviceName();
|
||||
}
|
||||
if (channelSettingsKeys.contains("rgbColor")) {
|
||||
settings.m_rgbColor = response.getM17ModSettings()->getRgbColor();
|
||||
if (channelSettingsKeys.contains("feedbackVolumeFactor")) {
|
||||
settings.m_feedbackVolumeFactor = response.getM17ModSettings()->getFeedbackVolumeFactor();
|
||||
}
|
||||
if (channelSettingsKeys.contains("title")) {
|
||||
settings.m_title = *response.getM17ModSettings()->getTitle();
|
||||
}
|
||||
if (channelSettingsKeys.contains("toneFrequency")) {
|
||||
settings.m_toneFrequency = response.getM17ModSettings()->getToneFrequency();
|
||||
}
|
||||
if (channelSettingsKeys.contains("volumeFactor")) {
|
||||
settings.m_volumeFactor = response.getM17ModSettings()->getVolumeFactor();
|
||||
if (channelSettingsKeys.contains("feedbackAudioEnable")) {
|
||||
settings.m_feedbackAudioEnable = response.getM17ModSettings()->getFeedbackAudioEnable() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getM17ModSettings()->getStreamIndex();
|
||||
@ -547,6 +519,39 @@ void M17Mod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
|
||||
settings.m_reverseAPIChannelIndex = response.getNfmModSettings()->getReverseApiChannelIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("sourceCall")) {
|
||||
settings.m_sourceCall = *response.getM17ModSettings()->getSourceCall();
|
||||
}
|
||||
if (channelSettingsKeys.contains("destCall")) {
|
||||
settings.m_destCall = *response.getM17ModSettings()->getDestCall();
|
||||
}
|
||||
if (channelSettingsKeys.contains("insertPosition")) {
|
||||
settings.m_insertPosition = response.getM17ModSettings()->getInsertPosition() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("can")) {
|
||||
settings.m_can = response.getM17ModSettings()->getCan() % 256;
|
||||
}
|
||||
if (channelSettingsKeys.contains("smsText")) {
|
||||
settings.m_smsText = *response.getM17ModSettings()->getSmsText();
|
||||
}
|
||||
if (channelSettingsKeys.contains("loopPacket")) {
|
||||
settings.m_loopPacket = response.getM17ModSettings()->getLoopPacket() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("loopPacketInterval")) {
|
||||
settings.m_loopPacketInterval = response.getM17ModSettings()->getLoopPacketInterval();
|
||||
}
|
||||
if (channelSettingsKeys.contains("aprsCallsign")) {
|
||||
settings.m_aprsCallsign = *response.getM17ModSettings()->getAprsCallsign();
|
||||
}
|
||||
if (channelSettingsKeys.contains("aprsTo")) {
|
||||
settings.m_aprsTo = *response.getM17ModSettings()->getAprsTo();
|
||||
}
|
||||
if (channelSettingsKeys.contains("aprsVia")) {
|
||||
settings.m_aprsVia = *response.getM17ModSettings()->getAprsVia();
|
||||
}
|
||||
if (channelSettingsKeys.contains("aprsInsertPosition")) {
|
||||
settings.m_aprsInsertPosition = response.getM17ModSettings()->getAprsInsertPosition() != 0;
|
||||
}
|
||||
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
|
||||
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getM17ModSettings()->getChannelMarker());
|
||||
}
|
||||
@ -568,15 +573,12 @@ int M17Mod::webapiReportGet(
|
||||
|
||||
void M17Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const M17ModSettings& settings)
|
||||
{
|
||||
response.getM17ModSettings()->setChannelMute(settings.m_channelMute ? 1 : 0);
|
||||
response.getM17ModSettings()->setFmDeviation(settings.m_fmDeviation);
|
||||
response.getM17ModSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
||||
response.getM17ModSettings()->setM17Mode((int) settings.m_m17Mode);
|
||||
response.getM17ModSettings()->setAudioType((int) settings.m_audioType);
|
||||
response.getM17ModSettings()->setPacketType((int) settings.m_packetType);
|
||||
response.getM17ModSettings()->setPlayLoop(settings.m_playLoop ? 1 : 0);
|
||||
response.getM17ModSettings()->setRfBandwidth(settings.m_rfBandwidth);
|
||||
response.getM17ModSettings()->setRgbColor(settings.m_rgbColor);
|
||||
response.getM17ModSettings()->setFmDeviation(settings.m_fmDeviation);
|
||||
response.getM17ModSettings()->setToneFrequency(settings.m_toneFrequency);
|
||||
response.getM17ModSettings()->setVolumeFactor(settings.m_volumeFactor);
|
||||
response.getM17ModSettings()->setChannelMute(settings.m_channelMute ? 1 : 0);
|
||||
|
||||
if (response.getM17ModSettings()->getTitle()) {
|
||||
*response.getM17ModSettings()->getTitle() = settings.m_title;
|
||||
@ -584,8 +586,10 @@ void M17Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
|
||||
response.getM17ModSettings()->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
|
||||
response.getM17ModSettings()->setToneFrequency(settings.m_toneFrequency);
|
||||
response.getM17ModSettings()->setVolumeFactor(settings.m_volumeFactor);
|
||||
response.getM17ModSettings()->setRgbColor(settings.m_rgbColor);
|
||||
response.getM17ModSettings()->setM17Mode((int) settings.m_m17Mode);
|
||||
response.getM17ModSettings()->setAudioType((int) settings.m_audioType);
|
||||
response.getM17ModSettings()->setPacketType((int) settings.m_packetType);
|
||||
|
||||
if (response.getM17ModSettings()->getAudioDeviceName()) {
|
||||
*response.getM17ModSettings()->getAudioDeviceName() = settings.m_audioDeviceName;
|
||||
@ -593,6 +597,15 @@ void M17Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
|
||||
response.getM17ModSettings()->setAudioDeviceName(new QString(settings.m_audioDeviceName));
|
||||
}
|
||||
|
||||
if (response.getM17ModSettings()->getFeedbackAudioDeviceName()) {
|
||||
*response.getM17ModSettings()->getFeedbackAudioDeviceName() = settings.m_audioDeviceName;
|
||||
} else {
|
||||
response.getM17ModSettings()->setFeedbackAudioDeviceName(new QString(settings.m_audioDeviceName));
|
||||
}
|
||||
|
||||
response.getM17ModSettings()->setFeedbackVolumeFactor(settings.m_feedbackVolumeFactor);
|
||||
response.getM17ModSettings()->setPlayLoop(settings.m_playLoop ? 1 : 0);
|
||||
response.getM17ModSettings()->setStreamIndex(settings.m_streamIndex);
|
||||
response.getM17ModSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
if (response.getM17ModSettings()->getReverseApiAddress()) {
|
||||
@ -605,6 +618,50 @@ void M17Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
|
||||
response.getM17ModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
response.getM17ModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||
|
||||
if (response.getM17ModSettings()->getSourceCall()) {
|
||||
*response.getM17ModSettings()->getSourceCall() = settings.m_sourceCall;
|
||||
} else {
|
||||
response.getM17ModSettings()->setSourceCall(new QString(settings.m_sourceCall));
|
||||
}
|
||||
|
||||
if (response.getM17ModSettings()->getDestCall()) {
|
||||
*response.getM17ModSettings()->getDestCall() = settings.m_destCall;
|
||||
} else {
|
||||
response.getM17ModSettings()->setDestCall(new QString(settings.m_destCall));
|
||||
}
|
||||
|
||||
response.getM17ModSettings()->setInsertPosition(settings.m_insertPosition ? 1 : 0);
|
||||
response.getM17ModSettings()->setCan(settings.m_can);
|
||||
|
||||
if (response.getM17ModSettings()->getSmsText()) {
|
||||
*response.getM17ModSettings()->getSmsText() = settings.m_smsText;
|
||||
} else {
|
||||
response.getM17ModSettings()->setSmsText(new QString(settings.m_smsText));
|
||||
}
|
||||
|
||||
response.getM17ModSettings()->setLoopPacket(settings.m_loopPacket ? 1 : 0);
|
||||
response.getM17ModSettings()->setLoopPacketInterval(settings.m_loopPacketInterval);
|
||||
|
||||
if (response.getM17ModSettings()->getAprsCallsign()) {
|
||||
*response.getM17ModSettings()->getAprsCallsign() = settings.m_aprsCallsign;
|
||||
} else {
|
||||
response.getM17ModSettings()->setAprsCallsign(new QString(settings.m_aprsCallsign));
|
||||
}
|
||||
|
||||
if (response.getM17ModSettings()->getAprsTo()) {
|
||||
*response.getM17ModSettings()->getAprsTo() = settings.m_aprsTo;
|
||||
} else {
|
||||
response.getM17ModSettings()->setAprsTo(new QString(settings.m_aprsTo));
|
||||
}
|
||||
|
||||
if (response.getM17ModSettings()->getAprsVia()) {
|
||||
*response.getM17ModSettings()->getAprsVia() = settings.m_aprsVia;
|
||||
} else {
|
||||
response.getM17ModSettings()->setAprsVia(new QString(settings.m_aprsVia));
|
||||
}
|
||||
|
||||
response.getM17ModSettings()->setAprsInsertPosition(settings.m_aprsInsertPosition ? 1 : 0);
|
||||
|
||||
if (settings.m_channelMarker)
|
||||
{
|
||||
if (response.getM17ModSettings()->getChannelMarker())
|
||||
@ -641,7 +698,7 @@ void M17Mod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
|
||||
response.getM17ModReport()->setChannelSampleRate(m_basebandSource->getChannelSampleRate());
|
||||
}
|
||||
|
||||
void M17Mod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const M17ModSettings& settings, bool force)
|
||||
void M17Mod::webapiReverseSendSettings(const QList<QString>& channelSettingsKeys, const M17ModSettings& settings, bool force)
|
||||
{
|
||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
||||
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
||||
@ -668,7 +725,7 @@ void M17Mod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, cons
|
||||
|
||||
void M17Mod::sendChannelSettings(
|
||||
const QList<ObjectPipe*>& pipes,
|
||||
QList<QString>& channelSettingsKeys,
|
||||
const QList<QString>& channelSettingsKeys,
|
||||
const M17ModSettings& settings,
|
||||
bool force)
|
||||
{
|
||||
@ -692,7 +749,7 @@ void M17Mod::sendChannelSettings(
|
||||
}
|
||||
|
||||
void M17Mod::webapiFormatChannelSettings(
|
||||
QList<QString>& channelSettingsKeys,
|
||||
const QList<QString>& channelSettingsKeys,
|
||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
||||
const M17ModSettings& settings,
|
||||
bool force
|
||||
@ -707,48 +764,90 @@ void M17Mod::webapiFormatChannelSettings(
|
||||
|
||||
// transfer data that has been modified. When force is on transfer all data except reverse API data
|
||||
|
||||
if (channelSettingsKeys.contains("channelMute") || force) {
|
||||
swgM17ModSettings->setChannelMute(settings.m_channelMute ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("inputFrequencyOffset") || force) {
|
||||
if (channelSettingsKeys.contains("inputFrequencyOffset")) {
|
||||
swgM17ModSettings->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
|
||||
}
|
||||
if (channelSettingsKeys.contains("m17Mode") || force) {
|
||||
swgM17ModSettings->setM17Mode((int) settings.m_m17Mode);
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioType") || force) {
|
||||
swgM17ModSettings->setAudioType((int) settings.m_audioType);
|
||||
}
|
||||
if (channelSettingsKeys.contains("packetType") || force) {
|
||||
swgM17ModSettings->setPacketType((int) settings.m_packetType);
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioDeviceName") || force) {
|
||||
swgM17ModSettings->setAudioDeviceName(new QString(settings.m_audioDeviceName));
|
||||
}
|
||||
if (channelSettingsKeys.contains("playLoop") || force) {
|
||||
swgM17ModSettings->setPlayLoop(settings.m_playLoop ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("fmDeviation") || force) {
|
||||
swgM17ModSettings->setFmDeviation(settings.m_fmDeviation);
|
||||
}
|
||||
if (channelSettingsKeys.contains("rfBandwidth") || force) {
|
||||
if (channelSettingsKeys.contains("rfBandwidth")) {
|
||||
swgM17ModSettings->setRfBandwidth(settings.m_rfBandwidth);
|
||||
}
|
||||
if (channelSettingsKeys.contains("rgbColor") || force) {
|
||||
swgM17ModSettings->setRgbColor(settings.m_rgbColor);
|
||||
if (channelSettingsKeys.contains("fmDeviation")) {
|
||||
swgM17ModSettings->setFmDeviation(settings.m_fmDeviation);
|
||||
}
|
||||
if (channelSettingsKeys.contains("title") || force) {
|
||||
swgM17ModSettings->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
if (channelSettingsKeys.contains("toneFrequency") || force) {
|
||||
if (channelSettingsKeys.contains("toneFrequency")) {
|
||||
swgM17ModSettings->setToneFrequency(settings.m_toneFrequency);
|
||||
}
|
||||
if (channelSettingsKeys.contains("volumeFactor") || force) {
|
||||
if (channelSettingsKeys.contains("volumeFactor")) {
|
||||
swgM17ModSettings->setVolumeFactor(settings.m_volumeFactor);
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
if (channelSettingsKeys.contains("channelMute")) {
|
||||
swgM17ModSettings->setChannelMute(settings.m_channelMute ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("playLoop")) {
|
||||
swgM17ModSettings->setPlayLoop(settings.m_playLoop ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("rgbColor")) {
|
||||
swgM17ModSettings->setRgbColor(settings.m_rgbColor);
|
||||
}
|
||||
if (channelSettingsKeys.contains("title")) {
|
||||
swgM17ModSettings->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
if (channelSettingsKeys.contains("m17Mode")) {
|
||||
swgM17ModSettings->setM17Mode((int) settings.m_m17Mode);
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioType")) {
|
||||
swgM17ModSettings->setAudioType((int) settings.m_audioType);
|
||||
}
|
||||
if (channelSettingsKeys.contains("packetType")) {
|
||||
swgM17ModSettings->setPacketType((int) settings.m_packetType);
|
||||
}
|
||||
if (channelSettingsKeys.contains("audioDeviceName")) {
|
||||
swgM17ModSettings->setAudioDeviceName(new QString(settings.m_audioDeviceName));
|
||||
}
|
||||
if (channelSettingsKeys.contains("feedbackAudioDeviceName")) {
|
||||
swgM17ModSettings->setFeedbackAudioDeviceName(new QString(settings.m_feedbackAudioDeviceName));
|
||||
}
|
||||
if (channelSettingsKeys.contains("feedbackVolumeFactor")) {
|
||||
swgM17ModSettings->setFeedbackVolumeFactor(settings.m_feedbackVolumeFactor);
|
||||
}
|
||||
if (channelSettingsKeys.contains("feedbackAudioEnable")) {
|
||||
swgM17ModSettings->setFeedbackAudioEnable(settings.m_feedbackAudioEnable ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
swgM17ModSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
if (channelSettingsKeys.contains("sourceCall")) {
|
||||
swgM17ModSettings->setSourceCall(new QString(settings.m_sourceCall));
|
||||
}
|
||||
if (channelSettingsKeys.contains("destCall")) {
|
||||
swgM17ModSettings->setDestCall(new QString(settings.m_destCall));
|
||||
}
|
||||
if (channelSettingsKeys.contains("insertPosition")) {
|
||||
swgM17ModSettings->setInsertPosition(settings.m_insertPosition ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("can")) {
|
||||
swgM17ModSettings->setCan(settings.m_can);
|
||||
}
|
||||
if (channelSettingsKeys.contains("smsText")) {
|
||||
swgM17ModSettings->setSmsText(new QString(settings.m_smsText));
|
||||
}
|
||||
if (channelSettingsKeys.contains("loopPacket")) {
|
||||
swgM17ModSettings->setLoopPacket(settings.m_loopPacket ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("loopPacketInterval")) {
|
||||
swgM17ModSettings->setLoopPacketInterval(settings.m_loopPacketInterval);
|
||||
}
|
||||
if (channelSettingsKeys.contains("aprsCallsign")) {
|
||||
swgM17ModSettings->setAprsCallsign(new QString(settings.m_aprsCallsign));
|
||||
}
|
||||
if (channelSettingsKeys.contains("aprsTo")) {
|
||||
swgM17ModSettings->setAprsTo(new QString(settings.m_aprsTo));
|
||||
}
|
||||
if (channelSettingsKeys.contains("aprsVia")) {
|
||||
swgM17ModSettings->setAprsVia(new QString(settings.m_aprsVia));
|
||||
}
|
||||
if (channelSettingsKeys.contains("aprsInsertPosition")) {
|
||||
swgM17ModSettings->setAprsInsertPosition(settings.m_aprsInsertPosition ? 1 : 0);
|
||||
}
|
||||
|
||||
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
|
||||
{
|
||||
|
@ -47,20 +47,23 @@ public:
|
||||
|
||||
public:
|
||||
const M17ModSettings& getSettings() const { return m_settings; }
|
||||
const QList<QString>& getSettingsKeys() const { return m_settingsKeys; }
|
||||
bool getForce() const { return m_force; }
|
||||
|
||||
static MsgConfigureM17Mod* create(const M17ModSettings& settings, bool force)
|
||||
static MsgConfigureM17Mod* create(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force)
|
||||
{
|
||||
return new MsgConfigureM17Mod(settings, force);
|
||||
return new MsgConfigureM17Mod(settings, settingsKeys, force);
|
||||
}
|
||||
|
||||
private:
|
||||
M17ModSettings m_settings;
|
||||
QList<QString> m_settingsKeys;
|
||||
bool m_force;
|
||||
|
||||
MsgConfigureM17Mod(const M17ModSettings& settings, bool force) :
|
||||
MsgConfigureM17Mod(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force) :
|
||||
Message(),
|
||||
m_settings(settings),
|
||||
m_settingsKeys(settingsKeys),
|
||||
m_force(force)
|
||||
{ }
|
||||
};
|
||||
@ -266,20 +269,20 @@ private:
|
||||
QTimer m_loopPacketTimer;
|
||||
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
void applySettings(const M17ModSettings& settings, bool force = false);
|
||||
void applySettings(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force = false);
|
||||
void sendSampleRateToDemodAnalyzer();
|
||||
void openFileStream();
|
||||
void seekFileStream(int seekPercentage);
|
||||
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
|
||||
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const M17ModSettings& settings, bool force);
|
||||
void webapiReverseSendSettings(const QList<QString>& channelSettingsKeys, const M17ModSettings& settings, bool force);
|
||||
void sendChannelSettings(
|
||||
const QList<ObjectPipe*>& pipes,
|
||||
QList<QString>& channelSettingsKeys,
|
||||
const QList<QString>& channelSettingsKeys,
|
||||
const M17ModSettings& settings,
|
||||
bool force
|
||||
);
|
||||
void webapiFormatChannelSettings(
|
||||
QList<QString>& channelSettingsKeys,
|
||||
const QList<QString>& channelSettingsKeys,
|
||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
|
||||
const M17ModSettings& settings,
|
||||
bool force
|
||||
|
@ -149,7 +149,7 @@ bool M17ModBaseband::handleMessage(const Message& cmd)
|
||||
MsgConfigureM17ModBaseband& cfg = (MsgConfigureM17ModBaseband&) cmd;
|
||||
qDebug() << "M17ModBaseband::handleMessage: MsgConfigureM17ModBaseband";
|
||||
|
||||
applySettings(cfg.getSettings(), cfg.getForce());
|
||||
applySettings(cfg.getSettings(), cfg.getSettingsKeys(), cfg.getForce());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -171,9 +171,9 @@ bool M17ModBaseband::handleMessage(const Message& cmd)
|
||||
}
|
||||
}
|
||||
|
||||
void M17ModBaseband::applySettings(const M17ModSettings& settings, bool force)
|
||||
void M17ModBaseband::applySettings(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force)
|
||||
{
|
||||
if ((settings.m_inputFrequencyOffset != m_settings.m_inputFrequencyOffset) || force)
|
||||
if (settingsKeys.contains("inputFrequencyOffset") || force)
|
||||
{
|
||||
m_channelizer->setChannelization(m_source.getAudioSampleRate(), settings.m_inputFrequencyOffset);
|
||||
m_source.applyChannelSettings(m_channelizer->getChannelSampleRate(), m_channelizer->getChannelFrequencyOffset());
|
||||
@ -181,7 +181,7 @@ void M17ModBaseband::applySettings(const M17ModSettings& settings, bool force)
|
||||
|
||||
}
|
||||
|
||||
if ((settings.m_audioDeviceName != m_settings.m_audioDeviceName) || force)
|
||||
if (settingsKeys.contains("audioDeviceName") || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
@ -196,7 +196,7 @@ void M17ModBaseband::applySettings(const M17ModSettings& settings, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_audioType != m_settings.m_audioType) || force)
|
||||
if (settingsKeys.contains("audioType") || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getInputDeviceIndex(settings.m_audioDeviceName);
|
||||
@ -208,7 +208,7 @@ void M17ModBaseband::applySettings(const M17ModSettings& settings, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_feedbackAudioDeviceName != m_settings.m_feedbackAudioDeviceName) || force)
|
||||
if (settingsKeys.contains("feedbackAudioDeviceName") || force)
|
||||
{
|
||||
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
|
||||
int audioDeviceIndex = audioDeviceManager->getOutputDeviceIndex(settings.m_feedbackAudioDeviceName);
|
||||
@ -221,9 +221,13 @@ void M17ModBaseband::applySettings(const M17ModSettings& settings, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
m_source.applySettings(settings, force);
|
||||
m_source.applySettings(settings, settingsKeys, force);
|
||||
|
||||
if (force) {
|
||||
m_settings = settings;
|
||||
} else {
|
||||
m_settings.applySettings(settingsKeys, settings);
|
||||
}
|
||||
}
|
||||
|
||||
int M17ModBaseband::getChannelSampleRate() const
|
||||
|
@ -39,20 +39,22 @@ public:
|
||||
|
||||
public:
|
||||
const M17ModSettings& getSettings() const { return m_settings; }
|
||||
const QList<QString>& getSettingsKeys() const { return m_settingsKeys; }
|
||||
bool getForce() const { return m_force; }
|
||||
|
||||
static MsgConfigureM17ModBaseband* create(const M17ModSettings& settings, bool force)
|
||||
{
|
||||
return new MsgConfigureM17ModBaseband(settings, force);
|
||||
static MsgConfigureM17ModBaseband* create(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force) {
|
||||
return new MsgConfigureM17ModBaseband(settings, settingsKeys, force);
|
||||
}
|
||||
|
||||
private:
|
||||
M17ModSettings m_settings;
|
||||
QList<QString> m_settingsKeys;
|
||||
bool m_force;
|
||||
|
||||
MsgConfigureM17ModBaseband(const M17ModSettings& settings, bool force) :
|
||||
MsgConfigureM17ModBaseband(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force) :
|
||||
Message(),
|
||||
m_settings(settings),
|
||||
m_settingsKeys(settingsKeys),
|
||||
m_force(force)
|
||||
{ }
|
||||
};
|
||||
@ -91,7 +93,7 @@ private:
|
||||
|
||||
void processFifo(SampleVector& data, unsigned int iBegin, unsigned int iEnd);
|
||||
bool handleMessage(const Message& cmd);
|
||||
void applySettings(const M17ModSettings& settings, bool force = false);
|
||||
void applySettings(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force = false);
|
||||
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
|
@ -55,7 +55,7 @@ void M17ModGUI::resetToDefaults()
|
||||
{
|
||||
m_settings.resetToDefaults();
|
||||
displaySettings();
|
||||
applySettings(true);
|
||||
applySettings(QList<QString>(), true);
|
||||
}
|
||||
|
||||
QByteArray M17ModGUI::serialize() const
|
||||
@ -67,7 +67,7 @@ bool M17ModGUI::deserialize(const QByteArray& data)
|
||||
{
|
||||
if(m_settings.deserialize(data)) {
|
||||
displaySettings();
|
||||
applySettings(true);
|
||||
applySettings(QList<QString>(), true);
|
||||
return true;
|
||||
} else {
|
||||
resetToDefaults();
|
||||
@ -129,7 +129,7 @@ void M17ModGUI::channelMarkerChangedByCursor()
|
||||
{
|
||||
ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
|
||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"inputFrequencyOffset"});
|
||||
}
|
||||
|
||||
void M17ModGUI::handleSourceMessages()
|
||||
@ -150,7 +150,7 @@ void M17ModGUI::on_deltaFrequency_changed(qint64 value)
|
||||
m_channelMarker.setCenterFrequency(value);
|
||||
m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
|
||||
updateAbsoluteCenterFrequency();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"inputFrequencyOffset"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_rfBW_valueChanged(int value)
|
||||
@ -159,28 +159,28 @@ void M17ModGUI::on_rfBW_valueChanged(int value)
|
||||
m_settings.m_rfBandwidth = value * 100.0;
|
||||
m_channelMarker.setBandwidth(m_settings.m_rfBandwidth);
|
||||
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"rfBandwidth"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_fmDev_valueChanged(int value)
|
||||
{
|
||||
ui->fmDevText->setText(QString("%1%2k").arg(QChar(0xB1, 0x00)).arg(value / 10.0, 0, 'f', 1));
|
||||
m_settings.m_fmDeviation = value * 200.0;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"fmDeviation"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_volume_valueChanged(int value)
|
||||
{
|
||||
ui->volumeText->setText(QString("%1").arg(value / 10.0, 0, 'f', 1));
|
||||
m_settings.m_volumeFactor = value / 10.0;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"volumeFactor"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_toneFrequency_valueChanged(int value)
|
||||
{
|
||||
ui->toneFrequencyText->setText(QString("%1k").arg(value / 100.0, 0, 'f', 2));
|
||||
m_settings.m_toneFrequency = value * 10.0;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"toneFrequency"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_fmAudio_toggled(bool checked)
|
||||
@ -190,25 +190,25 @@ void M17ModGUI::on_fmAudio_toggled(bool checked)
|
||||
if ((checked) && (m_settings.m_m17Mode == M17ModSettings::M17Mode::M17ModeM17Audio))
|
||||
{
|
||||
m_settings.m_m17Mode = M17ModSettings::M17Mode::M17ModeFMAudio;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"m17Mode"});
|
||||
}
|
||||
else if ((!checked) && (m_settings.m_m17Mode == M17ModSettings::M17Mode::M17ModeFMAudio))
|
||||
{
|
||||
m_settings.m_m17Mode = M17ModSettings::M17Mode::M17ModeM17Audio;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"m17Mode"});
|
||||
}
|
||||
}
|
||||
|
||||
void M17ModGUI::on_channelMute_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_channelMute = checked;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"channelMute"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_playLoop_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_playLoop = checked;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"playLoop"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_play_toggled(bool checked)
|
||||
@ -220,7 +220,7 @@ void M17ModGUI::on_play_toggled(bool checked)
|
||||
: M17ModSettings::M17Mode::M17ModeM17Audio
|
||||
: M17ModSettings::M17ModeNone;
|
||||
displayModes();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"audioType", "m17Mode"});
|
||||
ui->navTimeSlider->setEnabled(!checked);
|
||||
m_enableNavTime = !checked;
|
||||
}
|
||||
@ -229,7 +229,7 @@ void M17ModGUI::on_tone_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_m17Mode = checked ? M17ModSettings::M17ModeFMTone : M17ModSettings::M17ModeNone;
|
||||
displayModes();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"m17Mode"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_mic_toggled(bool checked)
|
||||
@ -241,20 +241,20 @@ void M17ModGUI::on_mic_toggled(bool checked)
|
||||
: M17ModSettings::M17Mode::M17ModeM17Audio
|
||||
: M17ModSettings::M17ModeNone;
|
||||
displayModes();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"audioType", "m17Mode"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_feedbackEnable_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_feedbackAudioEnable = checked;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"feedbackAudioEnable"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_feedbackVolume_valueChanged(int value)
|
||||
{
|
||||
ui->feedbackVolumeText->setText(QString("%1").arg(value / 100.0, 0, 'f', 2));
|
||||
m_settings.m_feedbackVolumeFactor = value / 100.0;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"feedbackVolumeFactor"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_navTimeSlider_valueChanged(int value)
|
||||
@ -289,14 +289,14 @@ void M17ModGUI::on_packetMode_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_m17Mode = checked ? M17ModSettings::M17ModeM17Packet : M17ModSettings::M17ModeNone;
|
||||
displayModes();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"m17Mode"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_bertMode_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_m17Mode = checked ? M17ModSettings::M17ModeM17BERT : M17ModSettings::M17ModeNone;
|
||||
displayModes();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"m17Mode"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_sendPacket_clicked(bool)
|
||||
@ -307,7 +307,7 @@ void M17ModGUI::on_sendPacket_clicked(bool)
|
||||
void M17ModGUI::on_loopPacket_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_loopPacket = checked;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"loopPacket"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_loopPacketInterval_valueChanged(int value)
|
||||
@ -315,73 +315,73 @@ void M17ModGUI::on_loopPacketInterval_valueChanged(int value)
|
||||
ui->loopPacketIntervalText->setText(tr("%1").arg(value));
|
||||
m_settings.m_loopPacketInterval = value;
|
||||
(void) value;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"loopPacketInterval"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_packetDataWidget_currentChanged(int index)
|
||||
{
|
||||
m_settings.m_packetType = indexToPacketType(index);
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"packetType"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_source_editingFinished()
|
||||
{
|
||||
m_settings.m_sourceCall = ui->source->text();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"sourceCall"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_destination_editingFinished()
|
||||
{
|
||||
m_settings.m_destCall = ui->destination->text();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"destCall"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_insertPosition_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_insertPosition = checked;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"insertPosition"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_can_valueChanged(int value)
|
||||
{
|
||||
m_settings.m_can = value;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"can"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_smsText_editingFinished()
|
||||
{
|
||||
m_settings.m_smsText = ui->smsText->toPlainText();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"smsText"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_aprsFromText_editingFinished()
|
||||
{
|
||||
m_settings.m_aprsCallsign = ui->aprsFromText->text();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"aprsCallsign"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_aprsTo_currentTextChanged(const QString &text)
|
||||
{
|
||||
m_settings.m_aprsTo = text;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"aprsTo"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_aprsVia_currentTextChanged(const QString &text)
|
||||
{
|
||||
m_settings.m_aprsVia = text;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"aprsVia"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_aprsData_editingFinished()
|
||||
{
|
||||
m_settings.m_aprsData = ui->aprsData->text();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"aprsData"});
|
||||
}
|
||||
|
||||
void M17ModGUI::on_aprsInsertPosition_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_aprsInsertPosition = checked;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"aprsInsertPosition"});
|
||||
}
|
||||
|
||||
void M17ModGUI::configureFileName()
|
||||
@ -397,7 +397,6 @@ void M17ModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
||||
(void) rollDown;
|
||||
|
||||
getRollupContents()->saveState(m_rollupState);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void M17ModGUI::onMenuDialogCalled(const QPoint &p)
|
||||
@ -433,15 +432,26 @@ void M17ModGUI::onMenuDialogCalled(const QPoint &p)
|
||||
setTitle(m_channelMarker.getTitle());
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
|
||||
QList<QString> settingsKeys({
|
||||
"m_rgbColor",
|
||||
"title",
|
||||
"useReverseAPI",
|
||||
"reverseAPIAddress",
|
||||
"reverseAPIPort",
|
||||
"reverseAPIDeviceIndex",
|
||||
"reverseAPIChannelIndex"
|
||||
});
|
||||
|
||||
if (m_deviceUISet->m_deviceMIMOEngine)
|
||||
{
|
||||
m_settings.m_streamIndex = dialog.getSelectedStreamIndex();
|
||||
settingsKeys.append("streamIndex");
|
||||
m_channelMarker.clearStreamIndexes();
|
||||
m_channelMarker.addStreamIndex(m_settings.m_streamIndex);
|
||||
updateIndexLabel();
|
||||
}
|
||||
|
||||
applySettings();
|
||||
applySettings(settingsKeys);
|
||||
}
|
||||
|
||||
resetContextMenuType();
|
||||
@ -516,7 +526,7 @@ M17ModGUI::M17ModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
|
||||
|
||||
displaySettings();
|
||||
makeUIConnections();
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"channelMarker", "rollupState"});
|
||||
}
|
||||
|
||||
M17ModGUI::~M17ModGUI()
|
||||
@ -529,11 +539,11 @@ void M17ModGUI::blockApplySettings(bool block)
|
||||
m_doApplySettings = !block;
|
||||
}
|
||||
|
||||
void M17ModGUI::applySettings(bool force)
|
||||
void M17ModGUI::applySettings(const QList<QString>& settingsKeys, bool force)
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
M17Mod::MsgConfigureM17Mod *msg = M17Mod::MsgConfigureM17Mod::create(m_settings, force);
|
||||
M17Mod::MsgConfigureM17Mod *msg = M17Mod::MsgConfigureM17Mod::create(m_settings, settingsKeys, force);
|
||||
m_m17Mod->getInputMessageQueue()->push(msg);
|
||||
}
|
||||
}
|
||||
@ -710,7 +720,7 @@ void M17ModGUI::audioSelect()
|
||||
if (audioSelect.m_selected)
|
||||
{
|
||||
m_settings.m_audioDeviceName = audioSelect.m_audioDeviceName;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"audioDeviceName"});
|
||||
}
|
||||
}
|
||||
|
||||
@ -723,7 +733,7 @@ void M17ModGUI::audioFeedbackSelect()
|
||||
if (audioSelect.m_selected)
|
||||
{
|
||||
m_settings.m_feedbackAudioDeviceName = audioSelect.m_audioDeviceName;
|
||||
applySettings();
|
||||
applySettings(QList<QString>{"feedbackAudioDeviceName"});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ private:
|
||||
virtual ~M17ModGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
void applySettings(bool force = false);
|
||||
void applySettings(const QList<QString>& settingsKeys, bool force = false);
|
||||
void displaySettings();
|
||||
void displayModes();
|
||||
void updateWithStreamData();
|
||||
|
@ -233,7 +233,6 @@ public:
|
||||
|
||||
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
M17ModFIFO *getBasebandFifo() { return &m_basebandFifo; }
|
||||
void resetInsertPositionToggle() { m_insertPositionToggle = true; }
|
||||
|
||||
private:
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
@ -223,3 +223,123 @@ bool M17ModSettings::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
void M17ModSettings::applySettings(const QStringList& settingsKeys, const M17ModSettings& settings)
|
||||
{
|
||||
if (settingsKeys.contains("inputFrequencyOffset")) {
|
||||
m_inputFrequencyOffset = settings.m_inputFrequencyOffset;
|
||||
}
|
||||
if (settingsKeys.contains("rfBandwidth")) {
|
||||
m_rfBandwidth = settings.m_rfBandwidth;
|
||||
}
|
||||
if (settingsKeys.contains("fmDeviation")) {
|
||||
m_fmDeviation = settings.m_fmDeviation;
|
||||
}
|
||||
if (settingsKeys.contains("toneFrequency")) {
|
||||
m_toneFrequency = settings.m_toneFrequency;
|
||||
}
|
||||
if (settingsKeys.contains("volumeFactor")) {
|
||||
m_volumeFactor = settings.m_volumeFactor;
|
||||
}
|
||||
if (settingsKeys.contains("channelMute")) {
|
||||
m_channelMute = settings.m_channelMute;
|
||||
}
|
||||
if (settingsKeys.contains("playLoop")) {
|
||||
m_playLoop = settings.m_playLoop;
|
||||
}
|
||||
if (settingsKeys.contains("rgbColor")) {
|
||||
m_rgbColor = settings.m_rgbColor;
|
||||
}
|
||||
if (settingsKeys.contains("title")) {
|
||||
m_title = settings.m_title;
|
||||
}
|
||||
if (settingsKeys.contains("m17Mode")) {
|
||||
m_m17Mode = settings.m_m17Mode;
|
||||
}
|
||||
if (settingsKeys.contains("audioType")) {
|
||||
m_audioType = settings.m_audioType;
|
||||
}
|
||||
if (settingsKeys.contains("packetType")) {
|
||||
m_packetType = settings.m_packetType;
|
||||
}
|
||||
if (settingsKeys.contains("audioDeviceName")) {
|
||||
m_audioDeviceName = settings.m_audioDeviceName;
|
||||
}
|
||||
if (settingsKeys.contains("feedbackAudioDeviceName")) {
|
||||
m_feedbackAudioDeviceName = settings.m_feedbackAudioDeviceName;
|
||||
}
|
||||
if (settingsKeys.contains("feedbackVolumeFactor")) {
|
||||
m_feedbackVolumeFactor = settings.m_feedbackVolumeFactor;
|
||||
}
|
||||
if (settingsKeys.contains("feedbackAudioEnable")) {
|
||||
m_feedbackAudioEnable = settings.m_feedbackAudioEnable;
|
||||
}
|
||||
if (settingsKeys.contains("streamIndex")) {
|
||||
m_streamIndex = settings.m_streamIndex;
|
||||
}
|
||||
if (settingsKeys.contains("useReverseAPI")) {
|
||||
m_useReverseAPI = settings.m_useReverseAPI;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIAddress")) {
|
||||
m_reverseAPIAddress = settings.m_reverseAPIAddress;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIPort")) {
|
||||
m_reverseAPIPort = settings.m_reverseAPIPort;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
m_reverseAPIDeviceIndex = settings.m_reverseAPIDeviceIndex;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIChannelIndex")) {
|
||||
m_reverseAPIChannelIndex = settings.m_reverseAPIChannelIndex;
|
||||
}
|
||||
if (settingsKeys.contains("workspaceIndex")) {
|
||||
m_workspaceIndex = settings.m_workspaceIndex;
|
||||
}
|
||||
if (settingsKeys.contains("geometryBytes")) {
|
||||
m_geometryBytes = settings.m_geometryBytes;
|
||||
}
|
||||
if (settingsKeys.contains("hidden")) {
|
||||
m_hidden = settings.m_hidden;
|
||||
}
|
||||
if (settingsKeys.contains("sourceCall")) {
|
||||
m_sourceCall = settings.m_sourceCall;
|
||||
}
|
||||
if (settingsKeys.contains("destCall")) {
|
||||
m_destCall = settings.m_destCall;
|
||||
}
|
||||
if (settingsKeys.contains("insertPosition")) {
|
||||
m_insertPosition = settings.m_insertPosition;
|
||||
}
|
||||
if (settingsKeys.contains("can")) {
|
||||
m_can = settings.m_can;
|
||||
}
|
||||
if (settingsKeys.contains("smsText")) {
|
||||
m_smsText = settings.m_smsText;
|
||||
}
|
||||
if (settingsKeys.contains("loopPacket")) {
|
||||
m_loopPacket = settings.m_loopPacket;
|
||||
}
|
||||
if (settingsKeys.contains("loopPacketInterval")) {
|
||||
m_loopPacketInterval = settings.m_loopPacketInterval;
|
||||
}
|
||||
if (settingsKeys.contains("aprsCallsign")) {
|
||||
m_aprsCallsign = settings.m_aprsCallsign;
|
||||
}
|
||||
if (settingsKeys.contains("aprsTo")) {
|
||||
m_aprsTo = settings.m_aprsTo;
|
||||
}
|
||||
if (settingsKeys.contains("aprsVia")) {
|
||||
m_aprsVia = settings.m_aprsVia;
|
||||
}
|
||||
if (settingsKeys.contains("aprsData")) {
|
||||
m_aprsData = settings.m_aprsData;
|
||||
}
|
||||
if (settingsKeys.contains("aprsInsertPosition")) {
|
||||
m_aprsInsertPosition = settings.m_aprsInsertPosition;
|
||||
}
|
||||
if (settingsKeys.contains("channelMarker")) {
|
||||
m_channelMarker = settings.m_channelMarker;
|
||||
}
|
||||
if (settingsKeys.contains("rollupState")) {
|
||||
m_rollupState = settings.m_rollupState;
|
||||
}
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ struct M17ModSettings
|
||||
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
void applySettings(const QStringList& settingsKeys, const M17ModSettings& settings);
|
||||
};
|
||||
|
||||
|
||||
|
@ -65,7 +65,7 @@ M17ModSource::M17ModSource() :
|
||||
m_processor->moveToThread(&m_processorThread);
|
||||
m_processorThread.start();
|
||||
|
||||
applySettings(m_settings, true);
|
||||
applySettings(m_settings, QList<QString>(), true);
|
||||
applyChannelSettings(m_channelSampleRate, m_channelFrequencyOffset, true);
|
||||
}
|
||||
|
||||
@ -525,19 +525,19 @@ void M17ModSource::applyFeedbackAudioSampleRate(int sampleRate)
|
||||
m_feedbackAudioSampleRate = sampleRate;
|
||||
}
|
||||
|
||||
void M17ModSource::applySettings(const M17ModSettings& settings, bool force)
|
||||
void M17ModSource::applySettings(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force)
|
||||
{
|
||||
if ((settings.m_rfBandwidth != m_settings.m_rfBandwidth) || force)
|
||||
if (settingsKeys.contains("rfBandwidth") || force)
|
||||
{
|
||||
m_settings.m_rfBandwidth = settings.m_rfBandwidth;
|
||||
applyAudioSampleRate(m_audioSampleRate);
|
||||
}
|
||||
|
||||
if ((settings.m_toneFrequency != m_settings.m_toneFrequency) || force) {
|
||||
if (settingsKeys.contains("toneFrequency") || force) {
|
||||
m_toneNco.setFreq(settings.m_toneFrequency, m_audioSampleRate);
|
||||
}
|
||||
|
||||
if ((settings.m_audioType != m_settings.m_audioType) || force)
|
||||
if (settingsKeys.contains("audioType") || force)
|
||||
{
|
||||
if (settings.m_audioType == M17ModSettings::AudioInput) {
|
||||
connect(&m_audioFifo, SIGNAL(dataReady()), this, SLOT(handleAudio()));
|
||||
@ -546,14 +546,11 @@ void M17ModSource::applySettings(const M17ModSettings& settings, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_insertPosition != m_settings.m_insertPosition) || force)
|
||||
{
|
||||
if (settings.m_insertPosition) {
|
||||
m_processor->resetInsertPositionToggle();
|
||||
}
|
||||
}
|
||||
|
||||
if (force) {
|
||||
m_settings = settings;
|
||||
} else {
|
||||
m_settings.applySettings(settingsKeys, settings);
|
||||
}
|
||||
}
|
||||
|
||||
void M17ModSource::applyChannelSettings(int channelSampleRate, int channelFrequencyOffset, bool force)
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
peakLevel = m_peakLevelOut;
|
||||
numSamples = m_levelNbSamples;
|
||||
}
|
||||
void applySettings(const M17ModSettings& settings, bool force = false);
|
||||
void applySettings(const M17ModSettings& settings, const QList<QString>& settingsKeys, bool force = false);
|
||||
void applyChannelSettings(int channelSampleRate, int channelFrequencyOffset, bool force = false);
|
||||
|
||||
void sendPacket();
|
||||
|
@ -8351,7 +8351,7 @@ margin-bottom: 20px;
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "NFMMod"
|
||||
"description" : "M17Mod"
|
||||
};
|
||||
defs.M17ModSettings = {
|
||||
"properties" : {
|
||||
@ -8387,9 +8387,6 @@ margin-bottom: 20px;
|
||||
"title" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"audioDeviceName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"m17Mode" : {
|
||||
"type" : "integer",
|
||||
"description" : "M17Mode"
|
||||
@ -8402,6 +8399,19 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "PacketType"
|
||||
},
|
||||
"audioDeviceName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"feedbackAudioDeviceName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"feedbackVolumeFactor" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"feedbackAudioEnable" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"streamIndex" : {
|
||||
"type" : "integer",
|
||||
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
||||
@ -8422,6 +8432,42 @@ margin-bottom: 20px;
|
||||
"reverseAPIChannelIndex" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"sourceCall" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"destCall" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"insertPosition" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"can" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"smsText" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"loopPacket" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"loopPacketInterval" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"aprsCallsign" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"aprsTo" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"aprsVia" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"aprsData" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"aprsInsertPosition" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"channelMarker" : {
|
||||
"$ref" : "#/definitions/ChannelMarker"
|
||||
},
|
||||
@ -56389,7 +56435,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2022-06-10T22:26:56.056+02:00
|
||||
Generated 2022-07-09T11:05:50.499+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,8 +24,6 @@ M17ModSettings:
|
||||
type: integer
|
||||
title:
|
||||
type: string
|
||||
audioDeviceName:
|
||||
type: string
|
||||
m17Mode:
|
||||
type: integer
|
||||
description: M17Mode
|
||||
@ -35,6 +33,15 @@ M17ModSettings:
|
||||
packetType:
|
||||
type: integer
|
||||
description: PacketType
|
||||
audioDeviceName:
|
||||
type: string
|
||||
feedbackAudioDeviceName:
|
||||
type: string
|
||||
feedbackVolumeFactor:
|
||||
type: number
|
||||
format: float
|
||||
feedbackAudioEnable:
|
||||
type: integer
|
||||
streamIndex:
|
||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||
type: integer
|
||||
@ -49,13 +56,37 @@ M17ModSettings:
|
||||
type: integer
|
||||
reverseAPIChannelIndex:
|
||||
type: integer
|
||||
sourceCall:
|
||||
type: string
|
||||
destCall:
|
||||
type: string
|
||||
insertPosition:
|
||||
type: integer
|
||||
can:
|
||||
type: integer
|
||||
smsText:
|
||||
type: string
|
||||
loopPacket:
|
||||
type: integer
|
||||
loopPacketInterval:
|
||||
type: integer
|
||||
aprsCallsign:
|
||||
type: string
|
||||
aprsTo:
|
||||
type: string
|
||||
aprsVia:
|
||||
type: string
|
||||
aprsData:
|
||||
type: string
|
||||
aprsInsertPosition:
|
||||
type: integer
|
||||
channelMarker:
|
||||
$ref: "/doc/swagger/include/ChannelMarker.yaml#/ChannelMarker"
|
||||
rollupState:
|
||||
$ref: "/doc/swagger/include/RollupState.yaml#/RollupState"
|
||||
|
||||
M17ModReport:
|
||||
description: NFMMod
|
||||
description: M17Mod
|
||||
properties:
|
||||
channelPowerDB:
|
||||
description: power transmitted in channel (dB)
|
||||
|
@ -24,8 +24,6 @@ M17ModSettings:
|
||||
type: integer
|
||||
title:
|
||||
type: string
|
||||
audioDeviceName:
|
||||
type: string
|
||||
m17Mode:
|
||||
type: integer
|
||||
description: M17Mode
|
||||
@ -35,6 +33,15 @@ M17ModSettings:
|
||||
packetType:
|
||||
type: integer
|
||||
description: PacketType
|
||||
audioDeviceName:
|
||||
type: string
|
||||
feedbackAudioDeviceName:
|
||||
type: string
|
||||
feedbackVolumeFactor:
|
||||
type: number
|
||||
format: float
|
||||
feedbackAudioEnable:
|
||||
type: integer
|
||||
streamIndex:
|
||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||
type: integer
|
||||
@ -49,13 +56,37 @@ M17ModSettings:
|
||||
type: integer
|
||||
reverseAPIChannelIndex:
|
||||
type: integer
|
||||
sourceCall:
|
||||
type: string
|
||||
destCall:
|
||||
type: string
|
||||
insertPosition:
|
||||
type: integer
|
||||
can:
|
||||
type: integer
|
||||
smsText:
|
||||
type: string
|
||||
loopPacket:
|
||||
type: integer
|
||||
loopPacketInterval:
|
||||
type: integer
|
||||
aprsCallsign:
|
||||
type: string
|
||||
aprsTo:
|
||||
type: string
|
||||
aprsVia:
|
||||
type: string
|
||||
aprsData:
|
||||
type: string
|
||||
aprsInsertPosition:
|
||||
type: integer
|
||||
channelMarker:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/ChannelMarker.yaml#/ChannelMarker"
|
||||
rollupState:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/RollupState.yaml#/RollupState"
|
||||
|
||||
M17ModReport:
|
||||
description: NFMMod
|
||||
description: M17Mod
|
||||
properties:
|
||||
channelPowerDB:
|
||||
description: power transmitted in channel (dB)
|
||||
|
@ -8351,7 +8351,7 @@ margin-bottom: 20px;
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "NFMMod"
|
||||
"description" : "M17Mod"
|
||||
};
|
||||
defs.M17ModSettings = {
|
||||
"properties" : {
|
||||
@ -8387,9 +8387,6 @@ margin-bottom: 20px;
|
||||
"title" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"audioDeviceName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"m17Mode" : {
|
||||
"type" : "integer",
|
||||
"description" : "M17Mode"
|
||||
@ -8402,6 +8399,19 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "PacketType"
|
||||
},
|
||||
"audioDeviceName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"feedbackAudioDeviceName" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"feedbackVolumeFactor" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"feedbackAudioEnable" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"streamIndex" : {
|
||||
"type" : "integer",
|
||||
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
||||
@ -8422,6 +8432,42 @@ margin-bottom: 20px;
|
||||
"reverseAPIChannelIndex" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"sourceCall" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"destCall" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"insertPosition" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"can" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"smsText" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"loopPacket" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"loopPacketInterval" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"aprsCallsign" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"aprsTo" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"aprsVia" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"aprsData" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"aprsInsertPosition" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"channelMarker" : {
|
||||
"$ref" : "#/definitions/ChannelMarker"
|
||||
},
|
||||
@ -56389,7 +56435,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2022-06-10T22:26:56.056+02:00
|
||||
Generated 2022-07-09T11:05:50.499+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -13,7 +13,7 @@
|
||||
/*
|
||||
* SWGM17ModReport.h
|
||||
*
|
||||
* NFMMod
|
||||
* M17Mod
|
||||
*/
|
||||
|
||||
#ifndef SWGM17ModReport_H_
|
||||
|
@ -46,14 +46,20 @@ SWGM17ModSettings::SWGM17ModSettings() {
|
||||
m_rgb_color_isSet = false;
|
||||
title = nullptr;
|
||||
m_title_isSet = false;
|
||||
audio_device_name = nullptr;
|
||||
m_audio_device_name_isSet = false;
|
||||
m17_mode = 0;
|
||||
m_m17_mode_isSet = false;
|
||||
audio_type = 0;
|
||||
m_audio_type_isSet = false;
|
||||
packet_type = 0;
|
||||
m_packet_type_isSet = false;
|
||||
audio_device_name = nullptr;
|
||||
m_audio_device_name_isSet = false;
|
||||
feedback_audio_device_name = nullptr;
|
||||
m_feedback_audio_device_name_isSet = false;
|
||||
feedback_volume_factor = 0.0f;
|
||||
m_feedback_volume_factor_isSet = false;
|
||||
feedback_audio_enable = 0;
|
||||
m_feedback_audio_enable_isSet = false;
|
||||
stream_index = 0;
|
||||
m_stream_index_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
@ -66,6 +72,30 @@ SWGM17ModSettings::SWGM17ModSettings() {
|
||||
m_reverse_api_device_index_isSet = false;
|
||||
reverse_api_channel_index = 0;
|
||||
m_reverse_api_channel_index_isSet = false;
|
||||
source_call = nullptr;
|
||||
m_source_call_isSet = false;
|
||||
dest_call = nullptr;
|
||||
m_dest_call_isSet = false;
|
||||
insert_position = 0;
|
||||
m_insert_position_isSet = false;
|
||||
can = 0;
|
||||
m_can_isSet = false;
|
||||
sms_text = nullptr;
|
||||
m_sms_text_isSet = false;
|
||||
loop_packet = 0;
|
||||
m_loop_packet_isSet = false;
|
||||
loop_packet_interval = 0;
|
||||
m_loop_packet_interval_isSet = false;
|
||||
aprs_callsign = nullptr;
|
||||
m_aprs_callsign_isSet = false;
|
||||
aprs_to = nullptr;
|
||||
m_aprs_to_isSet = false;
|
||||
aprs_via = nullptr;
|
||||
m_aprs_via_isSet = false;
|
||||
aprs_data = nullptr;
|
||||
m_aprs_data_isSet = false;
|
||||
aprs_insert_position = 0;
|
||||
m_aprs_insert_position_isSet = false;
|
||||
channel_marker = nullptr;
|
||||
m_channel_marker_isSet = false;
|
||||
rollup_state = nullptr;
|
||||
@ -96,14 +126,20 @@ SWGM17ModSettings::init() {
|
||||
m_rgb_color_isSet = false;
|
||||
title = new QString("");
|
||||
m_title_isSet = false;
|
||||
audio_device_name = new QString("");
|
||||
m_audio_device_name_isSet = false;
|
||||
m17_mode = 0;
|
||||
m_m17_mode_isSet = false;
|
||||
audio_type = 0;
|
||||
m_audio_type_isSet = false;
|
||||
packet_type = 0;
|
||||
m_packet_type_isSet = false;
|
||||
audio_device_name = new QString("");
|
||||
m_audio_device_name_isSet = false;
|
||||
feedback_audio_device_name = new QString("");
|
||||
m_feedback_audio_device_name_isSet = false;
|
||||
feedback_volume_factor = 0.0f;
|
||||
m_feedback_volume_factor_isSet = false;
|
||||
feedback_audio_enable = 0;
|
||||
m_feedback_audio_enable_isSet = false;
|
||||
stream_index = 0;
|
||||
m_stream_index_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
@ -116,6 +152,30 @@ SWGM17ModSettings::init() {
|
||||
m_reverse_api_device_index_isSet = false;
|
||||
reverse_api_channel_index = 0;
|
||||
m_reverse_api_channel_index_isSet = false;
|
||||
source_call = new QString("");
|
||||
m_source_call_isSet = false;
|
||||
dest_call = new QString("");
|
||||
m_dest_call_isSet = false;
|
||||
insert_position = 0;
|
||||
m_insert_position_isSet = false;
|
||||
can = 0;
|
||||
m_can_isSet = false;
|
||||
sms_text = new QString("");
|
||||
m_sms_text_isSet = false;
|
||||
loop_packet = 0;
|
||||
m_loop_packet_isSet = false;
|
||||
loop_packet_interval = 0;
|
||||
m_loop_packet_interval_isSet = false;
|
||||
aprs_callsign = new QString("");
|
||||
m_aprs_callsign_isSet = false;
|
||||
aprs_to = new QString("");
|
||||
m_aprs_to_isSet = false;
|
||||
aprs_via = new QString("");
|
||||
m_aprs_via_isSet = false;
|
||||
aprs_data = new QString("");
|
||||
m_aprs_data_isSet = false;
|
||||
aprs_insert_position = 0;
|
||||
m_aprs_insert_position_isSet = false;
|
||||
channel_marker = new SWGChannelMarker();
|
||||
m_channel_marker_isSet = false;
|
||||
rollup_state = new SWGRollupState();
|
||||
@ -135,10 +195,15 @@ SWGM17ModSettings::cleanup() {
|
||||
if(title != nullptr) {
|
||||
delete title;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(audio_device_name != nullptr) {
|
||||
delete audio_device_name;
|
||||
}
|
||||
|
||||
if(feedback_audio_device_name != nullptr) {
|
||||
delete feedback_audio_device_name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -149,6 +214,32 @@ SWGM17ModSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
if(source_call != nullptr) {
|
||||
delete source_call;
|
||||
}
|
||||
if(dest_call != nullptr) {
|
||||
delete dest_call;
|
||||
}
|
||||
|
||||
|
||||
if(sms_text != nullptr) {
|
||||
delete sms_text;
|
||||
}
|
||||
|
||||
|
||||
if(aprs_callsign != nullptr) {
|
||||
delete aprs_callsign;
|
||||
}
|
||||
if(aprs_to != nullptr) {
|
||||
delete aprs_to;
|
||||
}
|
||||
if(aprs_via != nullptr) {
|
||||
delete aprs_via;
|
||||
}
|
||||
if(aprs_data != nullptr) {
|
||||
delete aprs_data;
|
||||
}
|
||||
|
||||
if(channel_marker != nullptr) {
|
||||
delete channel_marker;
|
||||
}
|
||||
@ -186,14 +277,20 @@ SWGM17ModSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&audio_device_name, pJson["audioDeviceName"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&m17_mode, pJson["m17Mode"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&audio_type, pJson["audioType"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&packet_type, pJson["packetType"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&audio_device_name, pJson["audioDeviceName"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&feedback_audio_device_name, pJson["feedbackAudioDeviceName"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&feedback_volume_factor, pJson["feedbackVolumeFactor"], "float", "");
|
||||
|
||||
::SWGSDRangel::setValue(&feedback_audio_enable, pJson["feedbackAudioEnable"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
||||
@ -206,6 +303,30 @@ SWGM17ModSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&source_call, pJson["sourceCall"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&dest_call, pJson["destCall"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&insert_position, pJson["insertPosition"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&can, pJson["can"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&sms_text, pJson["smsText"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&loop_packet, pJson["loopPacket"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&loop_packet_interval, pJson["loopPacketInterval"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&aprs_callsign, pJson["aprsCallsign"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&aprs_to, pJson["aprsTo"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&aprs_via, pJson["aprsVia"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&aprs_data, pJson["aprsData"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&aprs_insert_position, pJson["aprsInsertPosition"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&channel_marker, pJson["channelMarker"], "SWGChannelMarker", "SWGChannelMarker");
|
||||
|
||||
::SWGSDRangel::setValue(&rollup_state, pJson["rollupState"], "SWGRollupState", "SWGRollupState");
|
||||
@ -253,9 +374,6 @@ SWGM17ModSettings::asJsonObject() {
|
||||
if(title != nullptr && *title != QString("")){
|
||||
toJsonValue(QString("title"), title, obj, QString("QString"));
|
||||
}
|
||||
if(audio_device_name != nullptr && *audio_device_name != QString("")){
|
||||
toJsonValue(QString("audioDeviceName"), audio_device_name, obj, QString("QString"));
|
||||
}
|
||||
if(m_m17_mode_isSet){
|
||||
obj->insert("m17Mode", QJsonValue(m17_mode));
|
||||
}
|
||||
@ -265,6 +383,18 @@ SWGM17ModSettings::asJsonObject() {
|
||||
if(m_packet_type_isSet){
|
||||
obj->insert("packetType", QJsonValue(packet_type));
|
||||
}
|
||||
if(audio_device_name != nullptr && *audio_device_name != QString("")){
|
||||
toJsonValue(QString("audioDeviceName"), audio_device_name, obj, QString("QString"));
|
||||
}
|
||||
if(feedback_audio_device_name != nullptr && *feedback_audio_device_name != QString("")){
|
||||
toJsonValue(QString("feedbackAudioDeviceName"), feedback_audio_device_name, obj, QString("QString"));
|
||||
}
|
||||
if(m_feedback_volume_factor_isSet){
|
||||
obj->insert("feedbackVolumeFactor", QJsonValue(feedback_volume_factor));
|
||||
}
|
||||
if(m_feedback_audio_enable_isSet){
|
||||
obj->insert("feedbackAudioEnable", QJsonValue(feedback_audio_enable));
|
||||
}
|
||||
if(m_stream_index_isSet){
|
||||
obj->insert("streamIndex", QJsonValue(stream_index));
|
||||
}
|
||||
@ -283,6 +413,42 @@ SWGM17ModSettings::asJsonObject() {
|
||||
if(m_reverse_api_channel_index_isSet){
|
||||
obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index));
|
||||
}
|
||||
if(source_call != nullptr && *source_call != QString("")){
|
||||
toJsonValue(QString("sourceCall"), source_call, obj, QString("QString"));
|
||||
}
|
||||
if(dest_call != nullptr && *dest_call != QString("")){
|
||||
toJsonValue(QString("destCall"), dest_call, obj, QString("QString"));
|
||||
}
|
||||
if(m_insert_position_isSet){
|
||||
obj->insert("insertPosition", QJsonValue(insert_position));
|
||||
}
|
||||
if(m_can_isSet){
|
||||
obj->insert("can", QJsonValue(can));
|
||||
}
|
||||
if(sms_text != nullptr && *sms_text != QString("")){
|
||||
toJsonValue(QString("smsText"), sms_text, obj, QString("QString"));
|
||||
}
|
||||
if(m_loop_packet_isSet){
|
||||
obj->insert("loopPacket", QJsonValue(loop_packet));
|
||||
}
|
||||
if(m_loop_packet_interval_isSet){
|
||||
obj->insert("loopPacketInterval", QJsonValue(loop_packet_interval));
|
||||
}
|
||||
if(aprs_callsign != nullptr && *aprs_callsign != QString("")){
|
||||
toJsonValue(QString("aprsCallsign"), aprs_callsign, obj, QString("QString"));
|
||||
}
|
||||
if(aprs_to != nullptr && *aprs_to != QString("")){
|
||||
toJsonValue(QString("aprsTo"), aprs_to, obj, QString("QString"));
|
||||
}
|
||||
if(aprs_via != nullptr && *aprs_via != QString("")){
|
||||
toJsonValue(QString("aprsVia"), aprs_via, obj, QString("QString"));
|
||||
}
|
||||
if(aprs_data != nullptr && *aprs_data != QString("")){
|
||||
toJsonValue(QString("aprsData"), aprs_data, obj, QString("QString"));
|
||||
}
|
||||
if(m_aprs_insert_position_isSet){
|
||||
obj->insert("aprsInsertPosition", QJsonValue(aprs_insert_position));
|
||||
}
|
||||
if((channel_marker != nullptr) && (channel_marker->isSet())){
|
||||
toJsonValue(QString("channelMarker"), channel_marker, obj, QString("SWGChannelMarker"));
|
||||
}
|
||||
@ -383,16 +549,6 @@ SWGM17ModSettings::setTitle(QString* title) {
|
||||
this->m_title_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getAudioDeviceName() {
|
||||
return audio_device_name;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setAudioDeviceName(QString* audio_device_name) {
|
||||
this->audio_device_name = audio_device_name;
|
||||
this->m_audio_device_name_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGM17ModSettings::getM17Mode() {
|
||||
return m17_mode;
|
||||
@ -423,6 +579,46 @@ SWGM17ModSettings::setPacketType(qint32 packet_type) {
|
||||
this->m_packet_type_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getAudioDeviceName() {
|
||||
return audio_device_name;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setAudioDeviceName(QString* audio_device_name) {
|
||||
this->audio_device_name = audio_device_name;
|
||||
this->m_audio_device_name_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getFeedbackAudioDeviceName() {
|
||||
return feedback_audio_device_name;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setFeedbackAudioDeviceName(QString* feedback_audio_device_name) {
|
||||
this->feedback_audio_device_name = feedback_audio_device_name;
|
||||
this->m_feedback_audio_device_name_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGM17ModSettings::getFeedbackVolumeFactor() {
|
||||
return feedback_volume_factor;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setFeedbackVolumeFactor(float feedback_volume_factor) {
|
||||
this->feedback_volume_factor = feedback_volume_factor;
|
||||
this->m_feedback_volume_factor_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGM17ModSettings::getFeedbackAudioEnable() {
|
||||
return feedback_audio_enable;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setFeedbackAudioEnable(qint32 feedback_audio_enable) {
|
||||
this->feedback_audio_enable = feedback_audio_enable;
|
||||
this->m_feedback_audio_enable_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGM17ModSettings::getStreamIndex() {
|
||||
return stream_index;
|
||||
@ -483,6 +679,126 @@ SWGM17ModSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
|
||||
this->m_reverse_api_channel_index_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getSourceCall() {
|
||||
return source_call;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setSourceCall(QString* source_call) {
|
||||
this->source_call = source_call;
|
||||
this->m_source_call_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getDestCall() {
|
||||
return dest_call;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setDestCall(QString* dest_call) {
|
||||
this->dest_call = dest_call;
|
||||
this->m_dest_call_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGM17ModSettings::getInsertPosition() {
|
||||
return insert_position;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setInsertPosition(qint32 insert_position) {
|
||||
this->insert_position = insert_position;
|
||||
this->m_insert_position_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGM17ModSettings::getCan() {
|
||||
return can;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setCan(qint32 can) {
|
||||
this->can = can;
|
||||
this->m_can_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getSmsText() {
|
||||
return sms_text;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setSmsText(QString* sms_text) {
|
||||
this->sms_text = sms_text;
|
||||
this->m_sms_text_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGM17ModSettings::getLoopPacket() {
|
||||
return loop_packet;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setLoopPacket(qint32 loop_packet) {
|
||||
this->loop_packet = loop_packet;
|
||||
this->m_loop_packet_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGM17ModSettings::getLoopPacketInterval() {
|
||||
return loop_packet_interval;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setLoopPacketInterval(qint32 loop_packet_interval) {
|
||||
this->loop_packet_interval = loop_packet_interval;
|
||||
this->m_loop_packet_interval_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getAprsCallsign() {
|
||||
return aprs_callsign;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setAprsCallsign(QString* aprs_callsign) {
|
||||
this->aprs_callsign = aprs_callsign;
|
||||
this->m_aprs_callsign_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getAprsTo() {
|
||||
return aprs_to;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setAprsTo(QString* aprs_to) {
|
||||
this->aprs_to = aprs_to;
|
||||
this->m_aprs_to_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getAprsVia() {
|
||||
return aprs_via;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setAprsVia(QString* aprs_via) {
|
||||
this->aprs_via = aprs_via;
|
||||
this->m_aprs_via_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGM17ModSettings::getAprsData() {
|
||||
return aprs_data;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setAprsData(QString* aprs_data) {
|
||||
this->aprs_data = aprs_data;
|
||||
this->m_aprs_data_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGM17ModSettings::getAprsInsertPosition() {
|
||||
return aprs_insert_position;
|
||||
}
|
||||
void
|
||||
SWGM17ModSettings::setAprsInsertPosition(qint32 aprs_insert_position) {
|
||||
this->aprs_insert_position = aprs_insert_position;
|
||||
this->m_aprs_insert_position_isSet = true;
|
||||
}
|
||||
|
||||
SWGChannelMarker*
|
||||
SWGM17ModSettings::getChannelMarker() {
|
||||
return channel_marker;
|
||||
@ -535,9 +851,6 @@ SWGM17ModSettings::isSet(){
|
||||
if(title && *title != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(audio_device_name && *audio_device_name != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_m17_mode_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
@ -547,6 +860,18 @@ SWGM17ModSettings::isSet(){
|
||||
if(m_packet_type_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(audio_device_name && *audio_device_name != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(feedback_audio_device_name && *feedback_audio_device_name != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_feedback_volume_factor_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_feedback_audio_enable_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_stream_index_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
@ -565,6 +890,42 @@ SWGM17ModSettings::isSet(){
|
||||
if(m_reverse_api_channel_index_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(source_call && *source_call != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(dest_call && *dest_call != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_insert_position_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_can_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(sms_text && *sms_text != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_loop_packet_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_loop_packet_interval_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(aprs_callsign && *aprs_callsign != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(aprs_to && *aprs_to != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(aprs_via && *aprs_via != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(aprs_data && *aprs_data != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_aprs_insert_position_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(channel_marker && channel_marker->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -71,9 +71,6 @@ public:
|
||||
QString* getTitle();
|
||||
void setTitle(QString* title);
|
||||
|
||||
QString* getAudioDeviceName();
|
||||
void setAudioDeviceName(QString* audio_device_name);
|
||||
|
||||
qint32 getM17Mode();
|
||||
void setM17Mode(qint32 m17_mode);
|
||||
|
||||
@ -83,6 +80,18 @@ public:
|
||||
qint32 getPacketType();
|
||||
void setPacketType(qint32 packet_type);
|
||||
|
||||
QString* getAudioDeviceName();
|
||||
void setAudioDeviceName(QString* audio_device_name);
|
||||
|
||||
QString* getFeedbackAudioDeviceName();
|
||||
void setFeedbackAudioDeviceName(QString* feedback_audio_device_name);
|
||||
|
||||
float getFeedbackVolumeFactor();
|
||||
void setFeedbackVolumeFactor(float feedback_volume_factor);
|
||||
|
||||
qint32 getFeedbackAudioEnable();
|
||||
void setFeedbackAudioEnable(qint32 feedback_audio_enable);
|
||||
|
||||
qint32 getStreamIndex();
|
||||
void setStreamIndex(qint32 stream_index);
|
||||
|
||||
@ -101,6 +110,42 @@ public:
|
||||
qint32 getReverseApiChannelIndex();
|
||||
void setReverseApiChannelIndex(qint32 reverse_api_channel_index);
|
||||
|
||||
QString* getSourceCall();
|
||||
void setSourceCall(QString* source_call);
|
||||
|
||||
QString* getDestCall();
|
||||
void setDestCall(QString* dest_call);
|
||||
|
||||
qint32 getInsertPosition();
|
||||
void setInsertPosition(qint32 insert_position);
|
||||
|
||||
qint32 getCan();
|
||||
void setCan(qint32 can);
|
||||
|
||||
QString* getSmsText();
|
||||
void setSmsText(QString* sms_text);
|
||||
|
||||
qint32 getLoopPacket();
|
||||
void setLoopPacket(qint32 loop_packet);
|
||||
|
||||
qint32 getLoopPacketInterval();
|
||||
void setLoopPacketInterval(qint32 loop_packet_interval);
|
||||
|
||||
QString* getAprsCallsign();
|
||||
void setAprsCallsign(QString* aprs_callsign);
|
||||
|
||||
QString* getAprsTo();
|
||||
void setAprsTo(QString* aprs_to);
|
||||
|
||||
QString* getAprsVia();
|
||||
void setAprsVia(QString* aprs_via);
|
||||
|
||||
QString* getAprsData();
|
||||
void setAprsData(QString* aprs_data);
|
||||
|
||||
qint32 getAprsInsertPosition();
|
||||
void setAprsInsertPosition(qint32 aprs_insert_position);
|
||||
|
||||
SWGChannelMarker* getChannelMarker();
|
||||
void setChannelMarker(SWGChannelMarker* channel_marker);
|
||||
|
||||
@ -138,9 +183,6 @@ private:
|
||||
QString* title;
|
||||
bool m_title_isSet;
|
||||
|
||||
QString* audio_device_name;
|
||||
bool m_audio_device_name_isSet;
|
||||
|
||||
qint32 m17_mode;
|
||||
bool m_m17_mode_isSet;
|
||||
|
||||
@ -150,6 +192,18 @@ private:
|
||||
qint32 packet_type;
|
||||
bool m_packet_type_isSet;
|
||||
|
||||
QString* audio_device_name;
|
||||
bool m_audio_device_name_isSet;
|
||||
|
||||
QString* feedback_audio_device_name;
|
||||
bool m_feedback_audio_device_name_isSet;
|
||||
|
||||
float feedback_volume_factor;
|
||||
bool m_feedback_volume_factor_isSet;
|
||||
|
||||
qint32 feedback_audio_enable;
|
||||
bool m_feedback_audio_enable_isSet;
|
||||
|
||||
qint32 stream_index;
|
||||
bool m_stream_index_isSet;
|
||||
|
||||
@ -168,6 +222,42 @@ private:
|
||||
qint32 reverse_api_channel_index;
|
||||
bool m_reverse_api_channel_index_isSet;
|
||||
|
||||
QString* source_call;
|
||||
bool m_source_call_isSet;
|
||||
|
||||
QString* dest_call;
|
||||
bool m_dest_call_isSet;
|
||||
|
||||
qint32 insert_position;
|
||||
bool m_insert_position_isSet;
|
||||
|
||||
qint32 can;
|
||||
bool m_can_isSet;
|
||||
|
||||
QString* sms_text;
|
||||
bool m_sms_text_isSet;
|
||||
|
||||
qint32 loop_packet;
|
||||
bool m_loop_packet_isSet;
|
||||
|
||||
qint32 loop_packet_interval;
|
||||
bool m_loop_packet_interval_isSet;
|
||||
|
||||
QString* aprs_callsign;
|
||||
bool m_aprs_callsign_isSet;
|
||||
|
||||
QString* aprs_to;
|
||||
bool m_aprs_to_isSet;
|
||||
|
||||
QString* aprs_via;
|
||||
bool m_aprs_via_isSet;
|
||||
|
||||
QString* aprs_data;
|
||||
bool m_aprs_data_isSet;
|
||||
|
||||
qint32 aprs_insert_position;
|
||||
bool m_aprs_insert_position_isSet;
|
||||
|
||||
SWGChannelMarker* channel_marker;
|
||||
bool m_channel_marker_isSet;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user