[hamradio-commits] [gnss-sdr] 45/149: bug fix in interleaved byte to complex data type adapter (incorrect scaled output when char to short int conversion was used, now replaced the two-step process by single GNURadio block interleaver char to complex)

Carles Fernandez carles_fernandez-guest at moszumanska.debian.org
Sat Feb 6 19:43:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

carles_fernandez-guest pushed a commit to branch next
in repository gnss-sdr.

commit 05937e69952e5cc9fd23b0945130e867f2b62b06
Author: Javier Arribas <javiarribas at gmail.com>
Date:   Mon Jan 11 12:26:45 2016 +0100

    bug fix in interleaved byte to complex data type adapter (incorrect
    scaled output when char to short int conversion was used, now replaced
    the two-step process by single GNURadio block interleaver char to
    complex)
---
 .../data_type_adapter/adapters/ibyte_to_complex.cc     | 18 ++++++------------
 .../data_type_adapter/adapters/ibyte_to_complex.h      |  7 +++----
 2 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc
index d93055b..77ac179 100644
--- a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc
+++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc
@@ -56,11 +56,9 @@ IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, std::strin
 
     size_t item_size = sizeof(gr_complex);
 
-    gr_interleaved_short_to_complex_ = gr::blocks::interleaved_short_to_complex::make();
-    gr_char_to_short_ = gr::blocks::char_to_short::make();
+    gr_interleaved_char_to_complex_ = gr::blocks::interleaved_char_to_complex::make();
 
-    DLOG(INFO) << "data_type_adapter_(" << gr_interleaved_short_to_complex_->unique_id() << ")";
-    DLOG(INFO) << "data_type_adapter_(" << gr_char_to_short_->unique_id() << ")";
+    DLOG(INFO) << "data_type_adapter_(" << gr_interleaved_char_to_complex_->unique_id() << ")";
 
     if (dump_)
         {
@@ -77,22 +75,18 @@ IbyteToComplex::~IbyteToComplex()
 
 void IbyteToComplex::connect(gr::top_block_sptr top_block)
 {
-	top_block->connect(gr_char_to_short_, 0, gr_interleaved_short_to_complex_ , 0);
-
-
     if (dump_)
         {
-            top_block->connect(gr_interleaved_short_to_complex_, 0, file_sink_, 0);
+            top_block->connect(gr_interleaved_char_to_complex_, 0, file_sink_, 0);
         }
 }
 
 
 void IbyteToComplex::disconnect(gr::top_block_sptr top_block)
 {
-	top_block->disconnect(gr_char_to_short_, 0, gr_interleaved_short_to_complex_ , 0);
     if (dump_)
         {
-            top_block->disconnect(gr_interleaved_short_to_complex_, 0, file_sink_, 0);
+            top_block->disconnect(gr_interleaved_char_to_complex_, 0, file_sink_, 0);
         }
 }
 
@@ -100,14 +94,14 @@ void IbyteToComplex::disconnect(gr::top_block_sptr top_block)
 
 gr::basic_block_sptr IbyteToComplex::get_left_block()
 {
-    return gr_char_to_short_;
+    return gr_interleaved_char_to_complex_;
 }
 
 
 
 gr::basic_block_sptr IbyteToComplex::get_right_block()
 {
-    return gr_interleaved_short_to_complex_;
+    return gr_interleaved_char_to_complex_;
 }
 
 
diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h
index 83ea734..5abe044 100644
--- a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h
+++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h
@@ -32,10 +32,10 @@
 #define GNSS_SDR_IBYTE_TO_COMPLEX_H_
 
 #include <string>
-#include <gnuradio/blocks/interleaved_short_to_complex.h>
-#include <gnuradio/blocks/char_to_short.h>
+#include <gnuradio/blocks/interleaved_char_to_complex.h>
 #include <gnuradio/blocks/file_sink.h>
 #include <gnuradio/msg_queue.h>
+#include "gnss_synchro.h"
 #include "gnss_block_interface.h"
 
 
@@ -74,8 +74,7 @@ public:
     gr::basic_block_sptr get_right_block();
 
 private:
-    gr::blocks::interleaved_short_to_complex::sptr gr_interleaved_short_to_complex_;
-    gr::blocks::char_to_short::sptr gr_char_to_short_;
+    gr::blocks::interleaved_char_to_complex::sptr gr_interleaved_char_to_complex_;
     ConfigurationInterface* config_;
     bool dump_;
     std::string dump_filename_;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gnss-sdr.git



More information about the pkg-hamradio-commits mailing list