From 98bbe099d9aa271b9f8f1d5f24548b886e401e72 Mon Sep 17 00:00:00 2001 From: paulh002 Date: Wed, 9 Feb 2022 22:44:50 +0100 Subject: [PATCH 1/3] SoapyRadioberry fix CMake --- SBC/rpi-4/SoapyRadioberrySDR/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 8fa3d214a198f48b45185083d3e6680067e14c3a Mon Sep 17 00:00:00 2001 From: paulh002 Date: Sat, 19 Feb 2022 02:18:50 +0100 Subject: [PATCH 2/3] update transmit --- SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp b/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp index bf92854..c1c9846 100644 --- a/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp +++ b/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp @@ -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; From dc40d4502485138e54300bc315d5041eda498579 Mon Sep 17 00:00:00 2001 From: paulh002 Date: Sat, 19 Feb 2022 16:16:04 +0100 Subject: [PATCH 3/3] update usb/lsb issue in write --- SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp b/SBC/rpi-4/SoapyRadioberrySDR/SoapyRadioberryStreaming.cpp index c1c9846..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)); } }