summaryrefslogtreecommitdiffstats
path: root/clients
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-09-07 15:31:18 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-09-07 15:31:18 -0500
commiteec55e52773704a15e117eb92699af0e34b93118 (patch)
treeea2af144e71a0edc0ffaa41f7a60e52ffca74b11 /clients
parent9141f86141909a370111e686585be47721968afc (diff)
downloadulab-eec55e52773704a15e117eb92699af0e34b93118.tar.gz
ulab-eec55e52773704a15e117eb92699af0e34b93118.zip
Add autodetection of FFTS library presence
Diffstat (limited to 'clients')
-rw-r--r--clients/tde/configure.in.in28
-rw-r--r--clients/tde/debian/control2
-rw-r--r--clients/tde/src/part/scope/Makefile.am2
-rw-r--r--clients/tde/src/part/scope/part.cpp15
4 files changed, 42 insertions, 5 deletions
diff --git a/clients/tde/configure.in.in b/clients/tde/configure.in.in
index a47e6de..7a8a6da 100644
--- a/clients/tde/configure.in.in
+++ b/clients/tde/configure.in.in
@@ -9,3 +9,31 @@ fi
KDE_INIT_DOXYGEN([The API Reference], [Version $VERSION])
+# -----------------------------------------------------------------
+#
+# pkg config check
+#
+# -----------------------------------------------------------------
+
+AC_ARG_VAR(PKGCONFIGFOUND, [Path to pkg-config])
+AC_CHECK_PROG(PKGCONFIGFOUND, pkg-config,[yes])
+
+#------------------------------------------------------------------
+#
+# Check for ffts
+#
+#------------------------------------------------------------------
+
+LIB_FFTS=""
+
+if test x$PKGCONFIGFOUND = xyes; then
+ PKG_CHECK_MODULES(FFTS, ffts >= 0.7, have_ffts=yes,have_ffts=no)
+
+ if test x$have_ffts = xyes; then
+ AC_DEFINE(HAVE_FFTS, 1, [have FFTS transform library])
+ LIB_FFTS=`pkg-config --libs ffts`
+ fi
+fi
+
+AC_SUBST(LIB_FFTS)
+AM_CONDITIONAL(with_included_ffts, [test x$included_ffts = xyes]) \ No newline at end of file
diff --git a/clients/tde/debian/control b/clients/tde/debian/control
index c8edf21..6ba0a61 100644
--- a/clients/tde/debian/control
+++ b/clients/tde/debian/control
@@ -3,7 +3,7 @@ Section: tde
Priority: optional
Maintainer: Timothy Pearson <kb9vqf@pearsoncomputing.net>
Standards-Version: 3.8.4
-Build-Depends: debhelper (>= 5.0), cdbs, tdelibs14-trinity-dev, libtqtrla-dev, libtdekrb-trinity-dev, libtdeldap-trinity-dev, libffts-dev, xutils, chrpath, gettext, quilt (>= 0.40), automake, autoconf, libtool, libltdl-dev
+Build-Depends: debhelper (>= 5.0), cdbs, tdelibs14-trinity-dev, libtqtrla-dev, libtdekrb-trinity-dev, libtdeldap-trinity-dev, libffts-dev [amd64], xutils, chrpath, gettext, quilt (>= 0.40), automake, autoconf, libtool, libltdl-dev
Homepage: http://ulab.trinitydesktop.org/
Package: remote-laboratory-client-trinity
diff --git a/clients/tde/src/part/scope/Makefile.am b/clients/tde/src/part/scope/Makefile.am
index 52d22c0..2ef5191 100644
--- a/clients/tde/src/part/scope/Makefile.am
+++ b/clients/tde/src/part/scope/Makefile.am
@@ -7,6 +7,6 @@ KDE_ICON = libremotelab_scope
#Part
kde_module_LTLIBRARIES = libremotelab_scope.la
libremotelab_scope_la_LIBADD = ../../widgets/libtracewidget.la ../../widgets/libfloatspinbox.la $(LIB_KFILE) $(LIB_TDEPARTS) $(LIB_TDEUI) $(LIB_QT)
-libremotelab_scope_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -ltdecore -ltdeui -ltdeio -ltdefx -ltdekrbsocket -ltqtrla -lffts
+libremotelab_scope_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -ltdecore -ltdeui -ltdeio -ltdefx -ltdekrbsocket -ltqtrla $(FFTS_LIBS)
libremotelab_scope_la_SOURCES = \
part.cpp layout.ui
diff --git a/clients/tde/src/part/scope/part.cpp b/clients/tde/src/part/scope/part.cpp
index fb056cd..cb38e07 100644
--- a/clients/tde/src/part/scope/part.cpp
+++ b/clients/tde/src/part/scope/part.cpp
@@ -20,11 +20,13 @@
* http://www.raptorengineeringinc.com
*/
-#define ENABLE_FFT
-
#include "define.h"
#include "part.h"
+#ifdef HAVE_FFTS
+#define ENABLE_FFT 1
+#endif // HAVE_FFTS
+
#include <tdeaboutdata.h> //::createAboutData()
#include <tdeaction.h>
#include <tdelocale.h>
@@ -2076,7 +2078,7 @@ void ScopePart::stopDAQ() {
}
#define WAVEFORM_MAGIC_NUMBER 1
-#define WAVEFORM_FILE_VERSION 3
+#define WAVEFORM_FILE_VERSION 4
void ScopePart::saveWaveforms() {
TQString saveFileName = KFileDialog::getSaveFileName(TQString::null, "*.wfm|Waveform Files (*.wfm)", 0, i18n("Save waveforms..."));
@@ -2112,6 +2114,7 @@ void ScopePart::saveWaveforms() {
ds << m_mathFirstOperand[traceno];
ds << m_mathSecondOperand[traceno];
ds << m_mathOperator[traceno];
+ ds << m_base->traceZoomWidget->traceOffset(traceno-1+m_maxNumberOfTraces);
}
for (int cursorno=0; cursorno<5; cursorno++) {
ds << m_traceWidget->cursorPosition(cursorno);
@@ -2171,6 +2174,12 @@ void ScopePart::recallWaveforms() {
ds >> m_mathFirstOperand[traceno];
ds >> m_mathSecondOperand[traceno];
ds >> m_mathOperator[traceno];
+ if (version >= 4) {
+ double offset;
+ ds >> offset;
+ m_traceWidget->setTraceOffset(traceno-1+m_maxNumberOfTraces, offset);
+ m_base->traceZoomWidget->setTraceOffset(traceno-1+m_maxNumberOfTraces, offset);
+ }
}
}
for (int cursorno=0; cursorno<5; cursorno++) {