aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hackrf/hackrf_source_c.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hackrf/hackrf_source_c.cc')
-rw-r--r--lib/hackrf/hackrf_source_c.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/hackrf/hackrf_source_c.cc b/lib/hackrf/hackrf_source_c.cc
index 022af7f..6a06f15 100644
--- a/lib/hackrf/hackrf_source_c.cc
+++ b/lib/hackrf/hackrf_source_c.cc
@@ -120,11 +120,11 @@ hackrf_source_c::hackrf_source_c (const std::string &args)
// create a lookup table for gr_complex values
for (unsigned int i = 0; i <= 0xffff; i++) {
#ifdef BOOST_LITTLE_ENDIAN
- _lut.push_back( gr_complex( (float(i & 0xff) - 127.5f) * (1.0f/128.0f),
- (float(i >> 8) - 127.5f) * (1.0f/128.0f) ) );
+ _lut.push_back( gr_complex( (float(char(i & 0xff))) * (1.0f/128.0f),
+ (float(char(i >> 8))) * (1.0f/128.0f) ) );
#else // BOOST_BIG_ENDIAN
- _lut.push_back( gr_complex( (float(i >> 8) - 127.5f) * (1.0f/128.0f),
- (float(i & 0xff) - 127.5f) * (1.0f/128.0f) ) );
+ _lut.push_back( gr_complex( (float(char(i >> 8))) * (1.0f/128.0f),
+ (float(char(i & 0xff))) * (1.0f/128.0f) ) );
#endif
}