summaryrefslogtreecommitdiff
path: root/gr-blocks/lib/interleaved_short_array_to_complex.h
diff options
context:
space:
mode:
authorghostop14 <ghostop14@gmail.com>2020-02-15 18:07:35 -0500
committerMichael Dickens <michael.dickens@ettus.com>2020-02-20 09:08:11 -0500
commit458414c7b2ab93fa1a6d130fa64d907dd9fca5f0 (patch)
tree95d0b94f17c4a5396756150558b922e0a240fb01 /gr-blocks/lib/interleaved_short_array_to_complex.h
parent5cd7b4cd472e9dca41f19e2cdfed4393374c9fe0 (diff)
gr-blocks: Add scaling option to Complex to/from ishort and ichar
The existing block combinations of complex-to-ichar/ichar-to-complex and complex-to-ishort/ishort-to-complex was not exposing a scale factor to the UI (it was hard-coded at 1.0) which prevented the blocks from being used with voltage-based inputs and outputs, for example a -127 to 127 byte input would be mapped directly to the same value as a float. The same was true in reverse and there were notes in the code about FIX clipping. Adding the scale factor provides a mechanism for the user to appropriately fix the clipping and scale the conversion correctly. Additional documentation was added to the block yml to provide guidance to users on how to appropriately select the scale factor for their use case, and the default value was set to 1.0 for backward compatibility.
Diffstat (limited to 'gr-blocks/lib/interleaved_short_array_to_complex.h')
-rw-r--r--gr-blocks/lib/interleaved_short_array_to_complex.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/gr-blocks/lib/interleaved_short_array_to_complex.h b/gr-blocks/lib/interleaved_short_array_to_complex.h
deleted file mode 100644
index 30aee57026..0000000000
--- a/gr-blocks/lib/interleaved_short_array_to_complex.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2012 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#ifndef INCLUDED_INTERLEAVED_SHORT_ARRAY_TO_COMPLEX_H
-#define INCLUDED_INTERLEAVED_SHORT_ARRAY_TO_COMPLEX_H
-
-#include <gnuradio/blocks/api.h>
-#include <gnuradio/gr_complex.h>
-
-/*
- * convert array of interleaved shorts to complex.
- * the shorts contains real, imaginary, real, imaginary...
- * nsamples is the number of shorts; it must be even.
- */
-BLOCKS_API void
-interleaved_short_array_to_complex(const short* in, gr_complex* out, int nsamples);
-
-#endif /* INCLUDED_INTERLEAVED_SHORT_ARRAY_TO_COMPLEX_H */