mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-09-03 13:47:50 -04:00
DSD demod plugin: DMR refactoring: allow stereo split of TDMA channels. Works with mbelib support only
This commit is contained in:
parent
87bb930a13
commit
6dfa20db20
@ -47,6 +47,7 @@ public:
|
|||||||
const unsigned char *getMbeDVFrame2() const { return m_decoder.getMbeDVFrame2(); }
|
const unsigned char *getMbeDVFrame2() const { return m_decoder.getMbeDVFrame2(); }
|
||||||
bool getVoice1On() const { return m_decoder.getVoice1On(); }
|
bool getVoice1On() const { return m_decoder.getVoice1On(); }
|
||||||
bool getVoice2On() const { return m_decoder.getVoice2On(); }
|
bool getVoice2On() const { return m_decoder.getVoice2On(); }
|
||||||
|
void setTDMAStereo(bool tdmaStereo) { m_decoder.setTDMAStereo(tdmaStereo); }
|
||||||
|
|
||||||
int getMbeRateIndex() const { return (int) m_decoder.getMbeRate(); }
|
int getMbeRateIndex() const { return (int) m_decoder.getMbeRate(); }
|
||||||
|
|
||||||
|
@ -90,7 +90,8 @@ void DSDDemod::configure(MessageQueue* messageQueue,
|
|||||||
bool enableCosineFiltering,
|
bool enableCosineFiltering,
|
||||||
bool syncOrConstellation,
|
bool syncOrConstellation,
|
||||||
bool slot1On,
|
bool slot1On,
|
||||||
bool slot2On)
|
bool slot2On,
|
||||||
|
bool tdmaStereo)
|
||||||
{
|
{
|
||||||
Message* cmd = MsgConfigureDSDDemod::create(rfBandwidth,
|
Message* cmd = MsgConfigureDSDDemod::create(rfBandwidth,
|
||||||
demodGain,
|
demodGain,
|
||||||
@ -103,7 +104,8 @@ void DSDDemod::configure(MessageQueue* messageQueue,
|
|||||||
enableCosineFiltering,
|
enableCosineFiltering,
|
||||||
syncOrConstellation,
|
syncOrConstellation,
|
||||||
slot1On,
|
slot1On,
|
||||||
slot2On);
|
slot2On,
|
||||||
|
tdmaStereo);
|
||||||
messageQueue->push(cmd);
|
messageQueue->push(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,6 +331,7 @@ bool DSDDemod::handleMessage(const Message& cmd)
|
|||||||
m_config.m_syncOrConstellation = cfg.getSyncOrConstellation();
|
m_config.m_syncOrConstellation = cfg.getSyncOrConstellation();
|
||||||
m_config.m_slot1On = cfg.getSlot1On();
|
m_config.m_slot1On = cfg.getSlot1On();
|
||||||
m_config.m_slot2On = cfg.getSlot2On();
|
m_config.m_slot2On = cfg.getSlot2On();
|
||||||
|
m_config.m_tdmaStereo = cfg.getTDMAStereo();
|
||||||
|
|
||||||
apply();
|
apply();
|
||||||
|
|
||||||
@ -343,7 +346,8 @@ bool DSDDemod::handleMessage(const Message& cmd)
|
|||||||
<< " m_enableCosineFiltering: " << m_config.m_enableCosineFiltering
|
<< " m_enableCosineFiltering: " << m_config.m_enableCosineFiltering
|
||||||
<< " m_syncOrConstellation: " << m_config.m_syncOrConstellation
|
<< " m_syncOrConstellation: " << m_config.m_syncOrConstellation
|
||||||
<< " m_slot1On: " << m_config.m_slot1On
|
<< " m_slot1On: " << m_config.m_slot1On
|
||||||
<< " m_slot2On: " << m_config.m_slot2On;
|
<< " m_slot2On: " << m_config.m_slot2On
|
||||||
|
<< " m_tdmaStereo: " << m_config.m_tdmaStereo;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -405,6 +409,11 @@ void DSDDemod::apply()
|
|||||||
m_dsdDecoder.enableCosineFiltering(m_config.m_enableCosineFiltering);
|
m_dsdDecoder.enableCosineFiltering(m_config.m_enableCosineFiltering);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_config.m_tdmaStereo != m_running.m_tdmaStereo)
|
||||||
|
{
|
||||||
|
m_dsdDecoder.setTDMAStereo(m_config.m_tdmaStereo);
|
||||||
|
}
|
||||||
|
|
||||||
m_running.m_inputSampleRate = m_config.m_inputSampleRate;
|
m_running.m_inputSampleRate = m_config.m_inputSampleRate;
|
||||||
m_running.m_inputFrequencyOffset = m_config.m_inputFrequencyOffset;
|
m_running.m_inputFrequencyOffset = m_config.m_inputFrequencyOffset;
|
||||||
m_running.m_rfBandwidth = m_config.m_rfBandwidth;
|
m_running.m_rfBandwidth = m_config.m_rfBandwidth;
|
||||||
@ -420,4 +429,5 @@ void DSDDemod::apply()
|
|||||||
m_running.m_syncOrConstellation = m_config.m_syncOrConstellation;
|
m_running.m_syncOrConstellation = m_config.m_syncOrConstellation;
|
||||||
m_running.m_slot1On = m_config.m_slot1On;
|
m_running.m_slot1On = m_config.m_slot1On;
|
||||||
m_running.m_slot2On = m_config.m_slot2On;
|
m_running.m_slot2On = m_config.m_slot2On;
|
||||||
|
m_running.m_tdmaStereo = m_config.m_tdmaStereo;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,8 @@ public:
|
|||||||
bool enableCosineFiltering,
|
bool enableCosineFiltering,
|
||||||
bool syncOrConstellation,
|
bool syncOrConstellation,
|
||||||
bool slot1On,
|
bool slot1On,
|
||||||
bool slot2On);
|
bool slot2On,
|
||||||
|
bool tdmaStereo);
|
||||||
|
|
||||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||||
virtual void start();
|
virtual void start();
|
||||||
@ -85,6 +86,7 @@ private:
|
|||||||
bool getSyncOrConstellation() const { return m_syncOrConstellation; }
|
bool getSyncOrConstellation() const { return m_syncOrConstellation; }
|
||||||
bool getSlot1On() const { return m_slot1On; }
|
bool getSlot1On() const { return m_slot1On; }
|
||||||
bool getSlot2On() const { return m_slot2On; }
|
bool getSlot2On() const { return m_slot2On; }
|
||||||
|
bool getTDMAStereo() const { return m_tdmaStereo; }
|
||||||
|
|
||||||
static MsgConfigureDSDDemod* create(int rfBandwidth,
|
static MsgConfigureDSDDemod* create(int rfBandwidth,
|
||||||
int demodGain,
|
int demodGain,
|
||||||
@ -97,7 +99,8 @@ private:
|
|||||||
bool enableCosineFiltering,
|
bool enableCosineFiltering,
|
||||||
bool syncOrConstellation,
|
bool syncOrConstellation,
|
||||||
bool slot1On,
|
bool slot1On,
|
||||||
bool slot2On)
|
bool slot2On,
|
||||||
|
bool tdmaStereo)
|
||||||
{
|
{
|
||||||
return new MsgConfigureDSDDemod(rfBandwidth,
|
return new MsgConfigureDSDDemod(rfBandwidth,
|
||||||
demodGain,
|
demodGain,
|
||||||
@ -110,7 +113,8 @@ private:
|
|||||||
enableCosineFiltering,
|
enableCosineFiltering,
|
||||||
syncOrConstellation,
|
syncOrConstellation,
|
||||||
slot1On,
|
slot1On,
|
||||||
slot2On);
|
slot2On,
|
||||||
|
tdmaStereo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -126,6 +130,7 @@ private:
|
|||||||
bool m_syncOrConstellation;
|
bool m_syncOrConstellation;
|
||||||
bool m_slot1On;
|
bool m_slot1On;
|
||||||
bool m_slot2On;
|
bool m_slot2On;
|
||||||
|
bool m_tdmaStereo;
|
||||||
|
|
||||||
MsgConfigureDSDDemod(int rfBandwidth,
|
MsgConfigureDSDDemod(int rfBandwidth,
|
||||||
int demodGain,
|
int demodGain,
|
||||||
@ -138,7 +143,8 @@ private:
|
|||||||
bool enableCosineFiltering,
|
bool enableCosineFiltering,
|
||||||
bool syncOrConstellation,
|
bool syncOrConstellation,
|
||||||
bool slot1On,
|
bool slot1On,
|
||||||
bool slot2On) :
|
bool slot2On,
|
||||||
|
bool tdmaStereo) :
|
||||||
Message(),
|
Message(),
|
||||||
m_rfBandwidth(rfBandwidth),
|
m_rfBandwidth(rfBandwidth),
|
||||||
m_demodGain(demodGain),
|
m_demodGain(demodGain),
|
||||||
@ -151,7 +157,8 @@ private:
|
|||||||
m_enableCosineFiltering(enableCosineFiltering),
|
m_enableCosineFiltering(enableCosineFiltering),
|
||||||
m_syncOrConstellation(syncOrConstellation),
|
m_syncOrConstellation(syncOrConstellation),
|
||||||
m_slot1On(slot1On),
|
m_slot1On(slot1On),
|
||||||
m_slot2On(slot2On)
|
m_slot2On(slot2On),
|
||||||
|
m_tdmaStereo(tdmaStereo)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -182,6 +189,7 @@ private:
|
|||||||
bool m_syncOrConstellation;
|
bool m_syncOrConstellation;
|
||||||
bool m_slot1On;
|
bool m_slot1On;
|
||||||
bool m_slot2On;
|
bool m_slot2On;
|
||||||
|
bool m_tdmaStereo;
|
||||||
|
|
||||||
Config() :
|
Config() :
|
||||||
m_inputSampleRate(-1),
|
m_inputSampleRate(-1),
|
||||||
@ -198,7 +206,8 @@ private:
|
|||||||
m_enableCosineFiltering(false),
|
m_enableCosineFiltering(false),
|
||||||
m_syncOrConstellation(false),
|
m_syncOrConstellation(false),
|
||||||
m_slot1On(false),
|
m_slot1On(false),
|
||||||
m_slot2On(false)
|
m_slot2On(false),
|
||||||
|
m_tdmaStereo(false)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -267,6 +267,12 @@ void DSDDemodGUI::on_slot2On_toggled(bool checked)
|
|||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DSDDemodGUI::on_tdmaStereoSplit_toggled(bool checked)
|
||||||
|
{
|
||||||
|
m_tdmaStereo = checked;
|
||||||
|
applySettings();
|
||||||
|
}
|
||||||
|
|
||||||
void DSDDemodGUI::on_squelchGate_valueChanged(int value)
|
void DSDDemodGUI::on_squelchGate_valueChanged(int value)
|
||||||
{
|
{
|
||||||
applySettings();
|
applySettings();
|
||||||
@ -315,6 +321,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceAPI *deviceAPI, QWidget* pa
|
|||||||
m_syncOrConstellation(false),
|
m_syncOrConstellation(false),
|
||||||
m_slot1On(false),
|
m_slot1On(false),
|
||||||
m_slot2On(false),
|
m_slot2On(false),
|
||||||
|
m_tdmaStereo(false),
|
||||||
m_squelchOpen(false),
|
m_squelchOpen(false),
|
||||||
m_channelPowerDbAvg(20,0),
|
m_channelPowerDbAvg(20,0),
|
||||||
m_tickCount(0)
|
m_tickCount(0)
|
||||||
@ -406,7 +413,8 @@ void DSDDemodGUI::applySettings()
|
|||||||
m_enableCosineFiltering,
|
m_enableCosineFiltering,
|
||||||
m_syncOrConstellation,
|
m_syncOrConstellation,
|
||||||
m_slot1On,
|
m_slot1On,
|
||||||
m_slot2On);
|
m_slot2On,
|
||||||
|
m_tdmaStereo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ private slots:
|
|||||||
void on_syncOrConstellation_toggled(bool checked);
|
void on_syncOrConstellation_toggled(bool checked);
|
||||||
void on_slot1On_toggled(bool checked);
|
void on_slot1On_toggled(bool checked);
|
||||||
void on_slot2On_toggled(bool checked);
|
void on_slot2On_toggled(bool checked);
|
||||||
|
void on_tdmaStereoSplit_toggled(bool checked);
|
||||||
void on_fmDeviation_valueChanged(int value);
|
void on_fmDeviation_valueChanged(int value);
|
||||||
void on_squelchGate_valueChanged(int value);
|
void on_squelchGate_valueChanged(int value);
|
||||||
void on_squelch_valueChanged(int value);
|
void on_squelch_valueChanged(int value);
|
||||||
@ -104,6 +105,7 @@ private:
|
|||||||
bool m_syncOrConstellation;
|
bool m_syncOrConstellation;
|
||||||
bool m_slot1On;
|
bool m_slot1On;
|
||||||
bool m_slot2On;
|
bool m_slot2On;
|
||||||
|
bool m_tdmaStereo;
|
||||||
bool m_audioMute;
|
bool m_audioMute;
|
||||||
bool m_squelchOpen;
|
bool m_squelchOpen;
|
||||||
MovingAverage<Real> m_channelPowerDbAvg;
|
MovingAverage<Real> m_channelPowerDbAvg;
|
||||||
|
@ -638,6 +638,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="ButtonSwitch" name="tdmaStereoSplit">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Split TDMA channels on left (slot 1) and right (slot 2) audio channels</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../../sdrbase/resources/res.qrc">
|
||||||
|
<normaloff>:/stereo.png</normaloff>:/stereo.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="squelchLabel">
|
<widget class="QLabel" name="squelchLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user