path: root/Transceiver52M
diff options
authorkurtis.heimerl <kurtis.heimerl@19bc5d8c-e614-43d4-8b26-e1612bc8e597>2012-11-23 08:37:32 +0000
committerkurtis.heimerl <kurtis.heimerl@19bc5d8c-e614-43d4-8b26-e1612bc8e597>2012-11-23 08:37:32 +0000
commitec842de74135a45b3977688ce914b2cfd4020c3d (patch)
treea31f19114872b8d5b420efec3c77b900474eb69e /Transceiver52M
parenta7fee637af3ca90077bece90af9887a43f246669 (diff)
Alexander's patches:
1)I did an experiment and compiled OpenBTS with clang yesterday, which immediately highlighted two potential bugs in the Transceiver52 code. I'm not sure they are indeed bugs and not the intended behavior, but they look very much like that. The first one is below and the second one is in the following mail. GSM::Time() arguments are defined like #define USB_LATENCY_INTRVL (10,0), which means that they are expanded into GSM::Time((10,0)). This expression is a GSM::Time() with a single parameter where (10,0) return value of the last argument, 0 in this case. I.e. GSM::Time((10,0)) is equivalent to GSM::Time(0). I think this was not the intention. 2) Printing \n after every complex number breaks output when you want to print it in a single line, e.g. in many debug output. I do not claim any copyright over this change, as it's very basic. Looking forward to see it merged into mainline. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4515 19bc5d8c-e614-43d4-8b26-e1612bc8e597
Diffstat (limited to 'Transceiver52M')
3 files changed, 4 insertions, 5 deletions
diff --git a/Transceiver52M/Complex.h b/Transceiver52M/Complex.h
index 32eb18f..d02944b 100644
--- a/Transceiver52M/Complex.h
+++ b/Transceiver52M/Complex.h
@@ -257,7 +257,6 @@ template<class Real> std::ostream& operator<<(std::ostream& os, const Complex<Re
//os << z.r << ", ";
//if (z.i>=0) { os << "+"; }
os << z.i << "j";
- os << "\n";
return os;
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index caf7bf0..f5fa822 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -36,12 +36,12 @@
#include "config.h"
-#define USB_LATENCY_INTRVL (10,0)
+#define USB_LATENCY_INTRVL 10,0
-# define USB_LATENCY_MIN (6,7)
+# define USB_LATENCY_MIN 6,7
-# define USB_LATENCY_MIN (1,1)
+# define USB_LATENCY_MIN 1,1
Transceiver::Transceiver(int wBasePort,
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp
index 78e9e57..6fc0c19 100644
--- a/Transceiver52M/UHDDevice.cpp
+++ b/Transceiver52M/UHDDevice.cpp
@@ -884,7 +884,7 @@ ssize_t smpl_buf::read(void *buf, size_t len, TIMESTAMP timestamp)
// How many samples should be copied
size_t num_smpls = time_end - timestamp;
- if (num_smpls > len);
+ if (num_smpls > len)
num_smpls = len;
// Starting index