diff --git a/SBC/rpi-4/SoapyRadioberrySDR/CMakeLists.txt b/SBC/rpi-4/SoapyRadioberrySDR/CMakeLists.txt index 7e09b3b..0e0607d 100644 --- a/SBC/rpi-4/SoapyRadioberrySDR/CMakeLists.txt +++ b/SBC/rpi-4/SoapyRadioberrySDR/CMakeLists.txt @@ -29,7 +29,7 @@ if (NOT SoapySDR_FOUND) message(WARNING "SoapySDR development files not found - skipping support") return() endif () - +set(CMAKE_CXX_STANDARD 14) #include_directories(${MY_DEVICE_INCLUDE_DIRS}) SOAPY_SDR_MODULE_UTIL( TARGET SoapyRadioberrySDR diff --git a/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp b/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp index bf92854..5f80382 100644 --- a/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp +++ b/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp @@ -207,7 +207,7 @@ int SoapyRadioberry::writeStream(SoapySDR::Stream *stream, const void * const *b int16_t di, dq; tx.i16TxBuffer[0] = (int16_t)(target_buffer[iq++] * 16384.0f); - tx.i16TxBuffer[1] = (int16_t)(target_buffer[iq++] * 16384.0f); + tx.i16TxBuffer[1] = (int16_t)(target_buffer[iq++] * -16384.0f); ret = write(fd_rb, &tx, 4 * sizeof(uint8_t)); } } @@ -222,8 +222,8 @@ int SoapyRadioberry::writeStream(SoapySDR::Stream *stream, const void * const *b tx.i8TxBuffer[0] = (unsigned char)((itarget_buffer[j] & 0xff00) >> 8); tx.i8TxBuffer[1] = (unsigned char)(itarget_buffer[j] & 0xff); - tx.i8TxBuffer[2] = (unsigned char)((itarget_buffer[j + 1] & 0xff00) >> 8); - tx.i8TxBuffer[3] = (unsigned char)(itarget_buffer[j + 1] & 0xff); + tx.i8TxBuffer[2] = (unsigned char)(((-1 * itarget_buffer[j + 1]) & 0xff00) >> 8); + tx.i8TxBuffer[3] = (unsigned char)(( -1 * itarget_buffer[j + 1]) & 0xff); ret = write(fd_rb, &tx, sizeof(uint32_t)); j += 2;