diff options
26 files changed, 324 insertions, 62 deletions
diff --git a/cmake/Modules/FindQwt.cmake b/cmake/Modules/FindQwt.cmake index bc8683f7dc..857020796d 100644 --- a/cmake/Modules/FindQwt.cmake +++ b/cmake/Modules/FindQwt.cmake @@ -3,11 +3,22 @@ # QWT_LIBRARIES libraries to link against # QWT_FOUND If false, do not try to use Qwt -find_path ( QWT_INCLUDE_DIRS qwt_plot.h /usr/include/qwt-qt4 /usr/include/qwt /opt/local/include/qwt ) - -find_library ( QWT_LIBRARIES NAMES qwt-qt4 qwt) +find_path (QWT_INCLUDE_DIRS + NAMES qwt_plot.h + PATHS + /usr/local/include/qwt-qt4 + /usr/local/include/qwt + /usr/include/qwt-qt4 + /usr/include/qwt +) + +find_library (QWT_LIBRARIES + NAMES qwt-qt4 qwt + PATHS /usr/local/lib /usr/lib +) # handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if # all listed variables are TRUE include ( FindPackageHandleStandardArgs ) find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARIES QWT_INCLUDE_DIRS ) +MARK_AS_ADVANCED(QWT_LIBRARIES QWT_INCLUDE_DIRS) diff --git a/cmake/Modules/GrMiscUtils.cmake b/cmake/Modules/GrMiscUtils.cmake index 0e1f40027a..27003cf59c 100644 --- a/cmake/Modules/GrMiscUtils.cmake +++ b/cmake/Modules/GrMiscUtils.cmake @@ -155,7 +155,7 @@ function(GR_LIBRARY_FOO target) GR_LIBTOOL(TARGET ${target} DESTINATION ${GR_LIBRARY_DIR}) #give the library a special name with ultra-zero soversion - set_target_properties(${target} PROPERTIES LIBRARY_OUTPUT_NAME ${target}-${LIBVER} SOVERSION "0.0.0") + set_target_properties(${target} PROPERTIES OUTPUT_NAME ${target}-${LIBVER} SOVERSION "0.0.0") set(target_name lib${target}-${LIBVER}.so.0.0.0) #custom command to generate symlinks diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake index ced8b16c86..4bcd67eb9e 100644 --- a/cmake/Modules/GrSwig.cmake +++ b/cmake/Modules/GrSwig.cmake @@ -67,23 +67,16 @@ function(GR_SWIG_MAKE_DOCS output_file) #call doxygen on the Doxyfile + input headers add_custom_command( OUTPUT ${OUTPUT_DIRECTORY}/xml/index.xml + ${OUTPUT_DIRECTORY}/xml/combine.xslt DEPENDS ${input_files} ${GR_SWIG_DOCS_SOURCE_DEPS} ${tag_deps} COMMAND ${DOXYGEN_EXECUTABLE} ${OUTPUT_DIRECTORY}/Doxyfile COMMENT "Generating doxygen xml for ${name} docs" ) - #call sync if we can to flush the doxygen writes to file before python reads - find_program(SYNC_EXECUTABLE sync) - unset(sync_command) - if(SYNC_EXECUTABLE) - set(sync_command COMMAND ${SYNC_EXECUTABLE}) - endif() - #call the swig_doc script on the xml files add_custom_command( - OUTPUT ${output_file} - DEPENDS ${input_files} ${OUTPUT_DIRECTORY}/xml/index.xml - ${sync_command} + OUTPUT ${output_file} + DEPENDS ${input_files} ${stamp-file} ${OUTPUT_DIRECTORY}/xml/index.xml COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${CMAKE_SOURCE_DIR}/docs/doxygen/swig_doc.py ${OUTPUT_DIRECTORY}/xml diff --git a/config/grc_gr_noaa.m4 b/config/grc_gr_noaa.m4 index 54df77503b..f750a46456 100644 --- a/config/grc_gr_noaa.m4 +++ b/config/grc_gr_noaa.m4 @@ -33,6 +33,7 @@ AC_DEFUN([GRC_GR_NOAA],[ gr-noaa/oct/Makefile \ gr-noaa/python/Makefile \ gr-noaa/swig/Makefile \ + gr-noaa/gnuradio-noaa.pc \ gr-noaa/swig/run_guile_tests \ ]) diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py index 5034099e3d..4148a546b3 100644 --- a/docs/doxygen/swig_doc.py +++ b/docs/doxygen/swig_doc.py @@ -27,7 +27,7 @@ python docstrings. """ -import sys +import sys, time try: from doxyxml import DoxyIndex, DoxyClass, DoxyFriend, DoxyFunction, DoxyFile, base @@ -193,15 +193,49 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): output.append(custom_output) # Create docstrings for the blocks. - blocks = di.in_category(Block) + tries = 0 + while(1): + try: + blocks = di.in_category(Block) + except: + if(tries < 3): + # May not be built just yet; sleep and try again + sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format( + swigdocfilename)) + time.sleep(1) + tries += 1 + else: + # if we've given it three tries, give up and raise an error + sys.stderr.write("XML parsing error with file {0}. giving up.\n".format( + swigdocfilename)) + raise + else: + break + make_funcs = set([]) for block in blocks: - try: - make_func = di.get_member(make_name(block.name()), DoxyFunction) - make_funcs.add(make_func.name()) - output.append(make_block_entry(di, block)) - except block.ParsingError: - print('Parsing error for block %s' % block.name()) + tries = 0 + while(1): + try: + make_func = di.get_member(make_name(block.name()), DoxyFunction) + make_funcs.add(make_func.name()) + output.append(make_block_entry(di, block)) + except block.ParsingError: + sys.stderr.write('Parsing error for block {0}'.format(block.name())) + except: + if(tries < 3): + # May not be built just yet; sleep and try again + sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format( + swigdocfilename)) + time.sleep(1) + tries += 1 + else: + # if we've given it three tries, give up and raise an error + sys.stderr.write("XML parsing error with file {0}. giving up.\n".format( + swigdocfilename)) + raise + else: + break # Create docstrings for functions # Don't include the make functions since they have already been dealt with. @@ -210,7 +244,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): try: output.append(make_func_entry(f)) except f.ParsingError: - print('Parsing error for function %s' % f.name()) + sys.stderr.write('Parsing error for function {0}'.format(f.name())) # Create docstrings for classes block_names = [block.name() for block in blocks] @@ -219,7 +253,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None): try: output.append(make_class_entry(k)) except k.ParsingError: - print('Parsing error for class %s' % k.name()) + sys.stderr.write('Parsing error for class {0}'.format(k.name())) # Docstrings are not created for anything that is not a function or a class. # If this excludes anything important please add it here. @@ -250,4 +284,24 @@ if __name__ == "__main__": custom_output = "\n\n".join(output) # Generate the docstrings interface file. - make_swig_interface_file(di, swigdocfilename, custom_output=custom_output) + # If parsing error on NoSuchMember, try again by rereading everything. + # Give up after 3 tries. + tries = 0 + while(1): + try: + make_swig_interface_file(di, swigdocfilename, custom_output=custom_output) + except: + if(tries < 3): + # May not be built just yet; sleep and try again + sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format( + swigdocfilename)) + time.sleep(1) + tries += 1 + else: + # if we've given it three tries, give up and raise an error + sys.stderr.write("XML parsing error with file {0}. giving up.\n".format( + swigdocfilename)) + raise + else: + break + diff --git a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.cc b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.cc index 2fc97a78aa..d0ed042381 100644 --- a/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.cc +++ b/gnuradio-core/src/lib/filter/qa_gri_mmse_fir_interpolator_cc.cc @@ -31,6 +31,7 @@ #include <stdio.h> #include <cmath> #include <stdexcept> +#include <unistd.h> #define NELEM(x) (sizeof (x) / sizeof (x[0])) diff --git a/gnuradio-core/src/lib/general/gr_burst_tagger.cc b/gnuradio-core/src/lib/general/gr_burst_tagger.cc index 4b3847b084..bd713d663e 100644 --- a/gnuradio-core/src/lib/general/gr_burst_tagger.cc +++ b/gnuradio-core/src/lib/general/gr_burst_tagger.cc @@ -43,10 +43,39 @@ gr_burst_tagger::gr_burst_tagger(size_t itemsize) std::stringstream str; str << name() << unique_id(); - d_key = pmt::pmt_string_to_symbol("burst"); + d_true_key = pmt::pmt_string_to_symbol("burst"); + d_true_value = pmt::PMT_T; + + d_false_key = pmt::pmt_string_to_symbol("burst"); + d_false_value = pmt::PMT_F; + d_id = pmt::pmt_string_to_symbol(str.str()); } +void +gr_burst_tagger::set_true_tag (const std::string &key, bool value) +{ + d_true_key = pmt::pmt_string_to_symbol(key); + if(value == true) { + d_true_value = pmt::PMT_T; + } + else { + d_true_value = pmt::PMT_F; + } +} + +void +gr_burst_tagger::set_false_tag (const std::string &key, bool value) +{ + d_false_key = pmt::pmt_string_to_symbol(key); + if(value == true) { + d_false_value = pmt::PMT_T; + } + else { + d_false_value = pmt::PMT_F; + } +} + gr_burst_tagger::~gr_burst_tagger() { } @@ -66,18 +95,15 @@ gr_burst_tagger::work(int noutput_items, if(trigger[i] > 0) { if(d_state == false) { d_state = true; - pmt::pmt_t value = pmt::PMT_T; - add_item_tag(0, nitems_written(0)+i, d_key, value, d_id); + add_item_tag(0, nitems_written(0)+i, d_true_key, d_true_value, d_id); } } else { if(d_state == true) { d_state = false; - pmt::pmt_t value = pmt::PMT_F; - add_item_tag(0, nitems_written(0)+i, d_key, value, d_id); + add_item_tag(0, nitems_written(0)+i, d_false_key, d_false_value, d_id); } } } - return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_burst_tagger.h b/gnuradio-core/src/lib/general/gr_burst_tagger.h index 7547ba9cc5..663a146f2e 100644 --- a/gnuradio-core/src/lib/general/gr_burst_tagger.h +++ b/gnuradio-core/src/lib/general/gr_burst_tagger.h @@ -40,14 +40,21 @@ class GR_CORE_API gr_burst_tagger : public gr_sync_block { size_t d_itemsize; bool d_state; - pmt::pmt_t d_key; + pmt::pmt_t d_true_key; + pmt::pmt_t d_true_value; + + pmt::pmt_t d_false_key; + pmt::pmt_t d_false_value; + pmt::pmt_t d_id; - + friend GR_CORE_API gr_burst_tagger_sptr gr_make_burst_tagger(size_t itemsize); gr_burst_tagger(size_t itemsize); public: ~gr_burst_tagger(); + void set_true_tag (const std::string &key, bool value); + void set_false_tag (const std::string &key, bool value); int work(int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/general/gr_burst_tagger.i b/gnuradio-core/src/lib/general/gr_burst_tagger.i index ebf1eea8c7..868941fc60 100644 --- a/gnuradio-core/src/lib/general/gr_burst_tagger.i +++ b/gnuradio-core/src/lib/general/gr_burst_tagger.i @@ -28,4 +28,8 @@ class gr_burst_tagger : public gr_sync_block { private: gr_burst_tagger(size_t itemsize); + + public: + void set_true_tag(const std::string &key, bool value); + void set_false_tag(const std::string &key, bool value); }; diff --git a/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc b/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc index 3293e3ab86..c66015c110 100644 --- a/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc +++ b/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc @@ -67,8 +67,17 @@ gr_fft_vcc_fftw::work (int noutput_items, if (d_window.size()){ gr_complex *dst = d_fft->get_inbuf(); - for (unsigned int i = 0; i < d_fft_size; i++) // apply window - dst[i] = in[i] * d_window[i]; + if(!d_forward && d_shift){ + int offset = (!d_forward && d_shift)?floor(d_fft_size/2):0; + int fft_m_offset = d_fft_size - offset; + for (unsigned int i = 0; i < offset; i++) // apply window + dst[i+fft_m_offset] = in[i] * d_window[i]; + for (unsigned int i = offset; i < d_fft_size; i++) // apply window + dst[i-offset] = in[i] * d_window[i]; + } else { + for (unsigned int i = 0; i < d_fft_size; i++) // apply window + dst[i] = in[i] * d_window[i]; + } } else { if(!d_forward && d_shift) { // apply an ifft shift on the data diff --git a/gnuradio-core/src/lib/io/gr_oscope_guts.cc b/gnuradio-core/src/lib/io/gr_oscope_guts.cc index ce7feca13c..f1bdeb9c1b 100644 --- a/gnuradio-core/src/lib/io/gr_oscope_guts.cc +++ b/gnuradio-core/src/lib/io/gr_oscope_guts.cc @@ -31,8 +31,7 @@ #include <math.h> #include <assert.h> -static const int OUTPUT_RECORD_SIZE = 2048; // must be power of 2 - +static const int OUTPUT_RECORD_SIZE = 16384; // Must be power of 2 static inline int wrap_bi (int buffer_index) // wrap buffer index { @@ -139,7 +138,7 @@ gr_oscope_guts::process_sample (const float *channel_data) { for (int i = 0; i < d_nchannels; i++) { - for (int j = OUTPUT_RECORD_SIZE-1; j >= 0; j--) + for (int j = OUTPUT_RECORD_SIZE-1; j > 0; j--) { d_buffer[i][j] = d_buffer[i][j-1]; } diff --git a/gr-digital/examples/narrowband/digital_bert_rx.py b/gr-digital/examples/narrowband/digital_bert_rx.py index 28331310d0..dfed0eee7a 100755 --- a/gr-digital/examples/narrowband/digital_bert_rx.py +++ b/gr-digital/examples/narrowband/digital_bert_rx.py @@ -113,9 +113,11 @@ class rx_psk_block(gr.top_block): self._demodulator = self._demodulator_class(**demod_kwargs) if(options.rx_freq is not None): + symbol_rate = options.bitrate / self._demodulator.bits_per_symbol() self._source = uhd_receiver(options.args, options.bitrate, options.samples_per_symbol, options.rx_freq, options.rx_gain, + options.spec, options.antenna, options.verbose) options.samples_per_symbol = self._source._sps diff --git a/gr-digital/examples/narrowband/digital_bert_tx.py b/gr-digital/examples/narrowband/digital_bert_tx.py index 46f4f90979..f29e997af6 100755 --- a/gr-digital/examples/narrowband/digital_bert_tx.py +++ b/gr-digital/examples/narrowband/digital_bert_tx.py @@ -67,9 +67,11 @@ class tx_psk_block(gr.top_block): self._modulator = self._modulator_class(**mod_kwargs) if(options.tx_freq is not None): - self._sink = uhd_transmitter(options.args, options.bitrate, + symbol_rate = options.bitrate / self._modulator.bits_per_symbol() + self._sink = uhd_transmitter(options.args, symbol_rate, options.samples_per_symbol, options.tx_freq, options.tx_gain, + options.spec, options.antenna, options.verbose) options.samples_per_symbol = self._sink._sps @@ -87,7 +89,8 @@ class tx_psk_block(gr.top_block): verbose=options.verbose, log=options.log) - self.connect(self._transmitter, self._sink) + self.amp = gr.multiply_const_cc(options.amplitude) + self.connect(self._transmitter, self.amp, self._sink) def get_options(mods): diff --git a/gr-digital/include/digital_mpsk_receiver_cc.h b/gr-digital/include/digital_mpsk_receiver_cc.h index e70495bfad..02cea8d25b 100644 --- a/gr-digital/include/digital_mpsk_receiver_cc.h +++ b/gr-digital/include/digital_mpsk_receiver_cc.h @@ -91,23 +91,37 @@ class DIGITAL_API digital_mpsk_receiver_cc : public gr_block, public gri_control gr_vector_void_star &output_items); - // Member functions related to the symbol tracking portion of the receiver - //! (M&M) Returns current value of mu - float mu() const { return d_mu;} + //! Returns the modulation order (M) currently set + float modulation_order() const { return d_M; } - //! (M&M) Returns current value of omega - float omega() const { return d_omega;} + //! Returns current value of theta + float theta() const { return d_theta; } - //! (M&M) Returns mu gain factor - float gain_mu() const { return d_gain_mu;} + //! Returns current value of mu + float mu() const { return d_mu; } - //! (M&M) Returns omega gain factor - float gain_omega() const { return d_gain_omega;} + //! Returns current value of omega + float omega() const { return d_omega; } - //! (M&M) Sets value of mu + //! Returns mu gain factor + float gain_mu() const { return d_gain_mu; } + + //! Returns omega gain factor + float gain_omega() const { return d_gain_omega; } + + //! Returns the relative omega limit + float gain_omega_rel() const {return d_omega_rel; } + + //! Sets the modulation order (M) currently + void set_modulation_order(unsigned int M); + + //! Sets value of theta + void set_theta(float theta) { d_theta = theta; } + + //! Sets value of mu void set_mu (float mu) { d_mu = mu; } - //! (M&M) Sets value of omega and its min and max values + //! Sets value of omega and its min and max values void set_omega (float omega) { d_omega = omega; d_min_omega = omega*(1.0 - d_omega_rel); @@ -115,12 +129,15 @@ class DIGITAL_API digital_mpsk_receiver_cc : public gr_block, public gri_control d_omega_mid = 0.5*(d_min_omega+d_max_omega); } - //! (M&M) Sets value for mu gain factor + //! Sets value for mu gain factor void set_gain_mu (float gain_mu) { d_gain_mu = gain_mu; } - //! (M&M) Sets value for omega gain factor + //! Sets value for omega gain factor void set_gain_omega (float gain_omega) { d_gain_omega = gain_omega; } + //! Sets the relative omega limit and resets omega min/max values + void set_gain_omega_rel(float omega_rel); + protected: /*! diff --git a/gr-digital/lib/digital_mpsk_receiver_cc.cc b/gr-digital/lib/digital_mpsk_receiver_cc.cc index 363b86c9f2..6d2bab8a4e 100644 --- a/gr-digital/lib/digital_mpsk_receiver_cc.cc +++ b/gr-digital/lib/digital_mpsk_receiver_cc.cc @@ -85,7 +85,18 @@ digital_mpsk_receiver_cc::digital_mpsk_receiver_cc (unsigned int M, float theta, // zero double length delay line. for (unsigned int i = 0; i < 2 * DLLEN; i++) d_dl[i] = gr_complex(0.0,0.0); + + set_modulation_order(d_M); +} + +digital_mpsk_receiver_cc::~digital_mpsk_receiver_cc () +{ + delete d_interp; +} +void +digital_mpsk_receiver_cc::set_modulation_order(unsigned int M) +{ // build the constellation vector from M make_constellation(); @@ -108,9 +119,11 @@ digital_mpsk_receiver_cc::digital_mpsk_receiver_cc (unsigned int M, float theta, } } -digital_mpsk_receiver_cc::~digital_mpsk_receiver_cc () +void +digital_mpsk_receiver_cc::set_gain_omega_rel(float omega_rel) { - delete d_interp; + d_omega_rel = omega_rel; + set_omega(d_omega); } void diff --git a/gr-digital/swig/digital_mpsk_receiver_cc.i b/gr-digital/swig/digital_mpsk_receiver_cc.i index b51411f6fb..2338a18547 100644 --- a/gr-digital/swig/digital_mpsk_receiver_cc.i +++ b/gr-digital/swig/digital_mpsk_receiver_cc.i @@ -37,16 +37,21 @@ class digital_mpsk_receiver_cc : public gr_block, public gri_control_loop float mu, float gain_mu, float omega, float gain_omega, float omega_rel); public: + float modulation_order() const { return d_M; } float mu() const { return d_mu;} float omega() const { return d_omega;} float gain_mu() const { return d_gain_mu;} float gain_omega() const { return d_gain_omega;} + float gain_omega_rel() const {return d_omega_rel; } + void set_modulation_order(unsigned int M); void set_mu (float mu) { d_mu = mu; } void set_omega (float omega) { d_omega = omega; d_min_omega = omega*(1.0 - d_omega_rel); d_max_omega = omega*(1.0 + d_omega_rel); } + void set_theta(float theta) { d_theta = theta; } void set_gain_mu (float gain_mu) { d_gain_mu = gain_mu; } void set_gain_omega (float gain_omega) { d_gain_omega = gain_omega; } + void set_gain_omega_rel(float omega_rel); }; diff --git a/gr-howto-write-a-block/version.sh b/gr-howto-write-a-block/version.sh index 58ec712f66..88a3de9479 100644 --- a/gr-howto-write-a-block/version.sh +++ b/gr-howto-write-a-block/version.sh @@ -1,4 +1,4 @@ MAJOR_VERSION=3 API_COMPAT=5 -MINOR_VERSION=1 -MAINT_VERSION=0 +MINOR_VERSION=2 +MAINT_VERSION=git diff --git a/gr-noaa/CMakeLists.txt b/gr-noaa/CMakeLists.txt index 621dd5d6ed..a3a5d56db4 100644 --- a/gr-noaa/CMakeLists.txt +++ b/gr-noaa/CMakeLists.txt @@ -84,4 +84,18 @@ if(ENABLE_PYTHON) add_subdirectory(apps) endif(ENABLE_PYTHON) +######################################################################## +# Create Pkg Config File +######################################################################## +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-noaa.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-noaa.pc +@ONLY) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-noaa.pc + DESTINATION ${GR_LIBRARY_DIR}/pkgconfig + COMPONENT "noaa_devel" +) + endif(ENABLE_GR_NOAA) diff --git a/gr-noaa/Makefile.am b/gr-noaa/Makefile.am index 854ce14766..ce5f66109e 100644 --- a/gr-noaa/Makefile.am +++ b/gr-noaa/Makefile.am @@ -27,3 +27,5 @@ if PYTHON SUBDIRS += swig python apps endif +pkgconfigdir = $(libdir)/pkgconfig +dist_pkgconfig_DATA = gnuradio-noaa.pc diff --git a/gr-noaa/gnuradio-noaa.pc.in b/gr-noaa/gnuradio-noaa.pc.in new file mode 100644 index 0000000000..cacfeeccae --- /dev/null +++ b/gr-noaa/gnuradio-noaa.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: gnuradio-noaa +Description: GNU Radio blocks implementing a NOAA satellite protocols +Requires: gnuradio-core +Version: @LIBVER@ +Libs: -L${libdir} -lgnuradio-noaa +Cflags: -I${includedir} diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am index 020dcecdd1..738e79f24a 100644 --- a/grc/blocks/Makefile.am +++ b/grc/blocks/Makefile.am @@ -162,6 +162,7 @@ dist_ourdata_DATA = \ gr_stream_to_vector.xml \ gr_streams_to_stream.xml \ gr_streams_to_vector.xml \ + gr_burst_tagger.xml \ gr_sub_xx.xml \ gr_threshold_ff.xml \ gr_throttle.xml \ diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index 183408ceca..abc12b97fc 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -104,6 +104,7 @@ <block>blks2_stream_to_vector_decimator</block> <block>gr_stream_mux</block> + <block>gr_burst_tagger</block> </cat> <cat> <name>Misc Conversions</name> diff --git a/grc/blocks/gr_burst_tagger.xml b/grc/blocks/gr_burst_tagger.xml new file mode 100644 index 0000000000..58c909999a --- /dev/null +++ b/grc/blocks/gr_burst_tagger.xml @@ -0,0 +1,87 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Burst tagger: +## all types, 1 output, 2 input: stream & trigger (short) +################################################### + --> +<block> + <name>Burst Tagger</name> + <key>gr_burst_tagger</key> + <import>from gnuradio import gr</import> + <make>gr.burst_tagger($type.size) +self.$(id).set_true_tag($true_key,$true_value) +self.$(id).set_false_tag($false_key,$false_value) + </make> + <callback>set_true_tag($true_key,$true_value)</callback> + <callback>set_false_tag($false_key,$false_value)</callback> + <param> + <name>Stream Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>complex</key> + <opt>size:gr.sizeof_gr_complex</opt> + </option> + <option> + <name>Float</name> + <key>float</key> + <opt>size:gr.sizeof_float</opt> + </option> + <option> + <name>Int</name> + <key>int</key> + <opt>size:gr.sizeof_int</opt> + </option> + <option> + <name>Short</name> + <key>short</key> + <opt>size:gr.sizeof_short</opt> + </option> + <option> + <name>Byte</name> + <key>byte</key> + <opt>size:gr.sizeof_char</opt> + </option> + </param> + <param> + <name>True KeyID</name> + <key>true_key</key> + <value>burst</value> + <type>string</type> + </param> + <param> + <name>True Value</name> + <key>true_value</key> + <value>True</value> + <type>bool</type> + </param> + <param> + <name>False KeyID</name> + <key>false_key</key> + <value>burst</value> + <type>string</type> + </param> + <param> + <name>False Value</name> + <key>false_value</key> + <value>False</value> + <type>bool</type> + </param> + <sink> + <name>in</name> + <type>$type</type> + <vlen>1</vlen> + </sink> + <sink> + <name>trigger</name> + <type>short</type> + <vlen>1</vlen> + </sink> + <source> + <name>out</name> + <type>$type</type> + <vlen>1</vlen> + </source> +</block> diff --git a/gruel/src/include/gruel/high_res_timer.h b/gruel/src/include/gruel/high_res_timer.h index 9be5246246..63841f6128 100644 --- a/gruel/src/include/gruel/high_res_timer.h +++ b/gruel/src/include/gruel/high_res_timer.h @@ -46,7 +46,7 @@ namespace gruel { #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) #define GRUEL_HRT_USE_MACH_ABSOLUTE_TIME #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) - #define GRUEL_HRT_USE_MACH_ABSOLUTE_TIME + #define GRUEL_HRT_USE_CLOCK_GETTIME #else #define GRUEL_HRT_USE_MICROSEC_CLOCK #endif diff --git a/version.sh b/version.sh index 58ec712f66..88a3de9479 100644 --- a/version.sh +++ b/version.sh @@ -1,4 +1,4 @@ MAJOR_VERSION=3 API_COMPAT=5 -MINOR_VERSION=1 -MAINT_VERSION=0 +MINOR_VERSION=2 +MAINT_VERSION=git diff --git a/volk/orc/volk_8i_convert_16i_a_orc_impl.orc b/volk/orc/volk_8i_convert_16i_a_orc_impl.orc index d813c6cfab..17198bf1e8 100644 --- a/volk/orc/volk_8i_convert_16i_a_orc_impl.orc +++ b/volk/orc/volk_8i_convert_16i_a_orc_impl.orc @@ -1,5 +1,6 @@ .function volk_8i_convert_16i_a_orc_impl .source 1 src .dest 2 dst -convsbw dst, src -shlw dst, dst, 8 +.temp 2 tmp +convsbw tmp, src +shlw dst, tmp, 8 |