mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
Replace separate create channel methods (BS and CS): Lora Demod
This commit is contained in:
parent
ef65afea02
commit
b8568feb47
@ -34,18 +34,23 @@ void LoRaPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
m_pluginAPI->registerRxChannel(LoRaDemod::m_channelIdURI, LoRaDemod::m_channelId, this);
|
||||
}
|
||||
|
||||
void LoRaPlugin::createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const
|
||||
{
|
||||
if (bs || cs)
|
||||
{
|
||||
LoRaDemod *instance = new LoRaDemod(deviceAPI);
|
||||
|
||||
if (bs) {
|
||||
*bs = instance;
|
||||
}
|
||||
|
||||
if (cs) {
|
||||
*cs = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PluginInstanceGUI* LoRaPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const
|
||||
{
|
||||
return LoRaDemodGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
}
|
||||
|
||||
BasebandSampleSink* LoRaPlugin::createRxChannelBS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new LoRaDemod(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelAPI* LoRaPlugin::createRxChannelCS(DeviceAPI *deviceAPI) const
|
||||
{
|
||||
return new LoRaDemod(deviceAPI);
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,8 @@ public:
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
|
||||
virtual void createRxChannel(DeviceAPI *deviceAPI, BasebandSampleSink **bs, ChannelAPI **cs) const;
|
||||
virtual PluginInstanceGUI* createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel) const;
|
||||
virtual BasebandSampleSink* createRxChannelBS(DeviceAPI *deviceAPI) const;
|
||||
virtual ChannelAPI* createRxChannelCS(DeviceAPI *deviceAPI) const;
|
||||
|
||||
private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
|
Loading…
Reference in New Issue
Block a user