diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-09-07 15:31:18 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-09-07 15:31:18 -0500 |
commit | eec55e52773704a15e117eb92699af0e34b93118 (patch) | |
tree | ea2af144e71a0edc0ffaa41f7a60e52ffca74b11 /clients/tde/src | |
parent | 9141f86141909a370111e686585be47721968afc (diff) | |
download | ulab-eec55e52773704a15e117eb92699af0e34b93118.tar.gz ulab-eec55e52773704a15e117eb92699af0e34b93118.zip |
Add autodetection of FFTS library presence
Diffstat (limited to 'clients/tde/src')
-rw-r--r-- | clients/tde/src/part/scope/Makefile.am | 2 | ||||
-rw-r--r-- | clients/tde/src/part/scope/part.cpp | 15 |
2 files changed, 13 insertions, 4 deletions
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++) { |