mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-14 15:33:34 -04:00
Fix missing YAML-to-SWG mappings for MeshCore plugins
The MeshCore mod plugin references SWGMeshcoreModActions in meshcoremod.cpp, but MeshcoreMod.yaml had no MeshcoreModActions section. When swagger files are regenerated, the auto-generated SWGChannelActions.h/cpp lose the meshcore_mod_actions member and accessors, which would break compilation of meshcoremod.cpp. Changes across five files: - MeshcoreMod.yaml: add MeshcoreModActions definition (sendNow field, matching existing hand-authored SWGMeshcoreModActions) - ChannelActions.yaml: add MeshcoreModActions pointing to the new section - SWGModelFactory.h: add #include and create() registration block for SWGMeshcoreModActions (was missing despite SWGMeshcoreModSettings/MeshcoreDemod* being registered) - webapirequestmapper.cpp: add channelActionsKey routing branch for MeshcoreModActions (was completely absent) - webapiutils.cpp: add m_channelURIToSettingsKey and m_channelTypeToSettingsKey entries for both MeshcoreDemod and MeshcoreMod (were missing, unlike ChirpChat and Meshtastic which have entries for their channel types)
This commit is contained in:
@@ -4855,6 +4855,11 @@ bool WebAPIRequestMapper::getChannelActions(
|
||||
channelActions->setIeee802154ModActions(new SWGSDRangel::SWGIEEE_802_15_4_ModActions());
|
||||
channelActions->getIeee802154ModActions()->fromJsonObject(actionsJsonObject);
|
||||
}
|
||||
else if (channelActionsKey == "MeshcoreModActions")
|
||||
{
|
||||
channelActions->setMeshcoreModActions(new SWGSDRangel::SWGMeshcoreModActions());
|
||||
channelActions->getMeshcoreModActions()->fromJsonObject(actionsJsonObject);
|
||||
}
|
||||
else if (channelActionsKey == "RadioAstronomyActions")
|
||||
{
|
||||
channelActions->setRadioAstronomyActions(new SWGSDRangel::SWGRadioAstronomyActions());
|
||||
|
||||
@@ -39,6 +39,8 @@ const QMap<QString, QString> WebAPIUtils::m_channelURIToSettingsKey = {
|
||||
{"sdrangel.channel.chirpchatdemod", "ChirpChatDemodSettings"},
|
||||
{"sdrangel.channel.meshtasticdemod", "ChirpChatDemodSettings"}, // alias: Meshtastic uses ChirpChatDemodSettings schema
|
||||
{"sdrangel.channel.modchirpchat", "ChirpChatModSettings"},
|
||||
{"sdrangel.channel.meshcoredemod", "MeshcoreDemodSettings"},
|
||||
{"sdrangel.channeltx.modmeshcore", "MeshcoreModSettings"},
|
||||
{"sdrangel.channel.demodatv", "ATVDemodSettings"},
|
||||
{"sdrangel.channel.demoddatv", "DATVDemodSettings"},
|
||||
{"sdrangel.channel.dabdemod", "DABDemodSettings"},
|
||||
@@ -165,6 +167,8 @@ const QMap<QString, QString> WebAPIUtils::m_channelTypeToSettingsKey = {
|
||||
{"ChirpChatDemod", "ChirpChatDemodSettings"},
|
||||
{"MeshtasticDemod", "ChirpChatDemodSettings"}, // alias: Meshtastic uses ChirpChatDemodSettings schema
|
||||
{"ChirpChatMod", "ChirpChatModSettings"},
|
||||
{"MeshcoreDemod", "MeshcoreDemodSettings"},
|
||||
{"MeshcoreMod", "MeshcoreModSettings"},
|
||||
{"ChannelPower", "ChannelPowerSettings"},
|
||||
{"DATVDemod", "DATVDemodSettings"},
|
||||
{"DATVMod", "DATVModSettings"},
|
||||
|
||||
@@ -29,6 +29,8 @@ ChannelActions:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/FreqScanner.yaml#/FreqScannerActions"
|
||||
IEEE_802_15_4_ModActions:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/IEEE_802_15_4_Mod.yaml#/IEEE_802_15_4_ModActions"
|
||||
MeshcoreModActions:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/MeshcoreMod.yaml#/MeshcoreModActions"
|
||||
PacketModActions:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/PacketMod.yaml#/PacketModActions"
|
||||
PSK31ModActions:
|
||||
|
||||
@@ -126,3 +126,13 @@ MeshcoreModReport:
|
||||
Boolean - modulator is active (playing) including idle time
|
||||
* 0 - Modulator not active
|
||||
* 1 - Modulator active
|
||||
|
||||
MeshcoreModActions:
|
||||
description: MeshcoreMod
|
||||
properties:
|
||||
sendNow:
|
||||
type: integer
|
||||
description: >
|
||||
Send packet immediately
|
||||
* 0 - Do nothing
|
||||
* 1 - Send packet
|
||||
|
||||
@@ -234,6 +234,7 @@
|
||||
#include "SWGMeshtasticModSettings.h"
|
||||
#include "SWGMeshcoreDemodReport.h"
|
||||
#include "SWGMeshcoreDemodSettings.h"
|
||||
#include "SWGMeshcoreModActions.h"
|
||||
#include "SWGMeshcoreModReport.h"
|
||||
#include "SWGMeshcoreModSettings.h"
|
||||
#include "SWGMetisMISOSettings.h"
|
||||
@@ -1516,6 +1517,11 @@ namespace SWGSDRangel {
|
||||
obj->init();
|
||||
return obj;
|
||||
}
|
||||
if(QString("SWGMeshcoreModActions").compare(type) == 0) {
|
||||
SWGMeshcoreModActions *obj = new SWGMeshcoreModActions();
|
||||
obj->init();
|
||||
return obj;
|
||||
}
|
||||
if(QString("SWGMetisMISOSettings").compare(type) == 0) {
|
||||
SWGMetisMISOSettings *obj = new SWGMetisMISOSettings();
|
||||
obj->init();
|
||||
|
||||
Reference in New Issue
Block a user