1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00

Merge pull request #1489 from srcejon/fix_1484

Check for existing pipes after GUI is created.
This commit is contained in:
Edouard Griffiths 2022-10-28 00:29:42 +02:00 committed by GitHub
commit bb6892a317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 0 deletions

View File

@ -44,6 +44,7 @@ MESSAGE_CLASS_DEFINITION(GS232Controller::MsgConfigureGS232Controller, Message)
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgStartStop, Message)
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgReportWorker, Message)
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgReportAvailableChannelOrFeatures, Message)
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgScanAvailableChannelOrFeatures, Message)
const char* const GS232Controller::m_featureIdURI = "sdrangel.feature.gs232controller";
const char* const GS232Controller::m_featureId = "GS232Controller";
@ -197,6 +198,11 @@ bool GS232Controller::handleMessage(const Message& cmd)
}
return true;
}
else if (MsgScanAvailableChannelOrFeatures::match(cmd))
{
scanAvailableChannelsAndFeatures();
return true;
}
else if (GS232ControllerReport::MsgReportAzAl::match(cmd))
{
GS232ControllerReport::MsgReportAzAl& report = (GS232ControllerReport::MsgReportAzAl&) cmd;

View File

@ -119,6 +119,22 @@ public:
{}
};
class MsgScanAvailableChannelOrFeatures : public Message {
MESSAGE_CLASS_DECLARATION
public:
static MsgScanAvailableChannelOrFeatures* create() {
return new MsgScanAvailableChannelOrFeatures();
}
protected:
MsgScanAvailableChannelOrFeatures() :
Message()
{ }
};
GS232Controller(WebAPIAdapterInterface *webAPIAdapterInterface);
virtual ~GS232Controller();
virtual void destroy() { delete this; }

View File

@ -178,6 +178,9 @@ GS232ControllerGUI::GS232ControllerGUI(PluginAPI* pluginAPI, FeatureUISet *featu
displaySettings();
applySettings(true);
makeUIConnections();
// Get pre-existing pipes
m_gs232Controller->getInputMessageQueue()->push(GS232Controller::MsgScanAvailableChannelOrFeatures::create());
}
GS232ControllerGUI::~GS232ControllerGUI()