forked from sdr/gr-osmosdr
HackRF: fix hackrf_source signedness
The LUT changes in 2e7d343fed
inadvertently started interpreting samples
as unsigned. This change puts it back to signed (and fixes an outdated
comment).
Signed-off-by: Eric Wild <ewild@sysmocom.de>
This commit is contained in:
parent
911082ff85
commit
bd668e97b6
|
@ -34,7 +34,7 @@
|
|||
#define BUF_LEN (16 * 32 * 512) /* must be multiple of 512 */
|
||||
#define BUF_NUM 15
|
||||
|
||||
#define BYTES_PER_SAMPLE 2 /* HackRF device produces/consumes 8 bit unsigned IQ data */
|
||||
#define BYTES_PER_SAMPLE 2 /* HackRF device produces/consumes 8 bit signed IQ data */
|
||||
|
||||
#define HACKRF_FORMAT_ERROR(ret, msg) \
|
||||
boost::str( boost::format(msg " (%1%) %2%") \
|
||||
|
|
|
@ -88,7 +88,7 @@ hackrf_source_c::hackrf_source_c (const std::string &args)
|
|||
|
||||
// create a lookup table for gr_complex values
|
||||
for (unsigned int i = 0; i <= 0xff; i++) {
|
||||
_lut.push_back( float(i) * (1.0f/128.0f) );
|
||||
_lut.push_back( float(int8_t(i)) * (1.0f/128.0f) );
|
||||
}
|
||||
|
||||
if ( BUF_NUM != _buf_num || BUF_LEN != _buf_len ) {
|
||||
|
|
Loading…
Reference in New Issue