This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Tom Tsou gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/2001
uhd: Add support for UHD-3.11 logging control
The logging API changes in UHD-3.11, which causes build failure if
not properly handled.
Change-Id: I223ebb9fae3f4061e0cb37c05263c1b569e8f628
---
M Transceiver52M/UHDDevice.cpp
M configure.ac
2 files changed, 15 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/01/2001/1
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp
index d139cdc..63e1bee 100644
--- a/Transceiver52M/UHDDevice.cpp
+++ b/Transceiver52M/UHDDevice.cpp
@@ -28,10 +28,13 @@
#include <uhd/property_tree.hpp>
#include <uhd/usrp/multi_usrp.hpp>
#include <uhd/utils/thread_priority.hpp>
-#include <uhd/utils/msg.hpp>
#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
+#ifndef USE_UHD_3_11
+#include <uhd/utils/msg.hpp>
#endif
#define B2XX_CLK_RT 26e6
@@ -84,7 +87,7 @@
/*
* USRP version dependent device timings
*/
-#ifdef USE_UHD_3_9
+#if defined(USE_UHD_3_9) || defined(USE_UHD_3_11)
#define B2XX_TIMING_1SPS 1.7153e-4
#define B2XX_TIMING_4SPS 1.1696e-4
#define B2XX_TIMING_4_4SPS 6.18462e-5
@@ -383,6 +386,7 @@
return NULL;
}
+#ifndef USE_UHD_3_11
/*
Catch and drop underrun 'U' and overrun 'O' messages from stdout
since we already report using the logging facility. Direct
@@ -404,6 +408,7 @@
break;
}
}
+#endif
static void thread_enable_cancel(bool cancel)
{
@@ -995,9 +1000,10 @@
return false;
}
+#ifndef USE_UHD_3_11
// Register msg handler
uhd::msg::register_handler(&uhd_msg_handler);
-
+#endif
// Start asynchronous event (underrun check) loop
async_event_thrd = new Thread();
async_event_thrd->start((void * (*)(void*))async_event_loop, (void*)this);
diff --git a/configure.ac b/configure.ac
index 649bb0e..f1159c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,9 +97,12 @@
])
AS_IF([test "x$with_usrp1" != "xyes"],[
- PKG_CHECK_MODULES(UHD, uhd >= 003.009,
- [AC_DEFINE(USE_UHD_3_9, 1, UHD version 3.9.0 or higher)],
- [PKG_CHECK_MODULES(UHD, uhd >= 003.005.004)]
+ PKG_CHECK_MODULES(UHD, uhd >= 003.011,
+ [AC_DEFINE(USE_UHD_3_11, 1, UHD version 3.11.0 or higher)],
+ [PKG_CHECK_MODULES(UHD, uhd >= 003.009,
+ [AC_DEFINE(USE_UHD_3_9, 1, UHD version 3.9.0 or higher)],
+ [PKG_CHECK_MODULES(UHD, uhd >= 003.005)]
+ )]
)
AC_DEFINE(USE_UHD, 1, All UHD versions)
PKG_CHECK_MODULES(FFTWF, fftw3f)
--
To view, visit https://gerrit.osmocom.org/2001
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I223ebb9fae3f4061e0cb37c05263c1b569e8f628
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Tom Tsou <tom at tsou.cc>