- added parameter 'gap time'

git-svn-id: http://moon:8086/svn/software/trunk/projects/GnuRadio@419 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2019-02-09 12:22:52 +00:00
parent 87b98ba4d2
commit 4f2a886b78
4 changed files with 13 additions and 8 deletions
+6 -1
View File
@@ -3,7 +3,7 @@
<key>jay_bit_slicer</key>
<category>[JAY]</category>
<import>import jay</import>
<make>jay.bit_slicer($sampleRate, $samplesPerSym, $kLoopFilter, $kThreshold, $doPrintPackets)</make>
<make>jay.bit_slicer($sampleRate, $samplesPerSym, $kLoopFilter, $kThreshold, $numGapBits, $doPrintPackets)</make>
<param>
<name>Samplerate</name>
<key>sampleRate</key>
@@ -26,6 +26,11 @@
<value>0.1</value>
<type>float</type>
</param>
<param>
<name>Gap time</name>
<key>numGapBits</key>
<type>int</type>
</param>
<param>
<name>Print packets</name>
<key>doPrintPackets</key>
+1 -1
View File
@@ -46,7 +46,7 @@ namespace gr {
* class. jay::bit_slicer::make is the public interface for
* creating new instances.
*/
static sptr make(int sampleRate, int samplesPerSym, float kLoopfilter, float kThreshold, int doPrintPackets);
static sptr make(int sampleRate, int samplesPerSym, float kLoopfilter, float kThreshold, int numGapBits, int doPrintPackets);
};
} // namespace jay
+5 -5
View File
@@ -33,15 +33,15 @@ namespace gr
namespace jay
{
bit_slicer::sptr bit_slicer::make(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int doPrintPackets)
bit_slicer::sptr bit_slicer::make(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int numGapBits, int doPrintPackets)
{
return gnuradio::get_initial_sptr(new bit_slicer_impl(sampleRate, samplesPerSym, kLoopFilter, kThreshold, doPrintPackets));
return gnuradio::get_initial_sptr(new bit_slicer_impl(sampleRate, samplesPerSym, kLoopFilter, kThreshold, numGapBits, doPrintPackets));
}
/*
* The private constructor
*/
bit_slicer_impl::bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int doPrintPackets)
bit_slicer_impl::bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int numGapBits, int doPrintPackets)
: gr::block("bit_slicer", gr::io_signature::make(1, 1, sizeof(float)),
gr::io_signature::make(1, 1, sizeof(float)))
, m_sampleRate(sampleRate)
@@ -62,7 +62,7 @@ bit_slicer_impl::bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopF
, m_id_bit(0)
, m_bitZeroCross(0)
, m_i(0)
, m_gapDistance(8*m_samplesPerSym)
, m_gapDistance(numGapBits*m_samplesPerSym)
, m_gapCounter(0)
, m_gapCounterEnable(0)
, m_packetCounter(0)
@@ -198,7 +198,7 @@ int bit_slicer_impl::general_work (int noutput_items, gr_vector_int &ninput_item
}
else
{
out[outCount++] = (float)0xFFFFFFFF;
// out[outCount++] = (float)0xFFFFFFFF;
}
}
+1 -1
View File
@@ -67,7 +67,7 @@ class bit_slicer_impl : public bit_slicer
bool stop() override;
public:
bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int doPrintPackets);
bit_slicer_impl(int sampleRate, int samplesPerSym, float kLoopFilter, float kThreshold, int numGapBits, int doPrintPackets);
~bit_slicer_impl();
// Where all the action really happens