Uwe Hermann [Fri, 17 Mar 2017 22:00:04 +0000 (23:00 +0100)]
AnalogSignal::paint_trace(): Factor out a const variable.
Uwe Hermann [Fri, 17 Mar 2017 19:47:36 +0000 (20:47 +0100)]
Add a hotkey to show/hide sampling points.
This is also hooked up into the global settings, so it will be
persistent across multiple PulseView runs.
This fixes (parts of) bug #485.
Uwe Hermann [Fri, 17 Mar 2017 19:35:20 +0000 (20:35 +0100)]
Show sampling points in logic traces.
This fixes (parts of) bug #485.
Uwe Hermann [Thu, 16 Mar 2017 22:29:24 +0000 (23:29 +0100)]
Increase session saving chunk size for much better performance.
Increasing the StoreSession chunk size from 1Msamples to 10Msamples
leads to massively faster session saving due to reduced overhead.
In some cases a 2x (or more) speed-up has been observed. A further increase
to, say, 100Msamples shows no further noticeable improvements.
This also has the additional benefit of generating fewer entries/files
within the sigrok session (*.sr) output/ZIP files, which can potentially
be beneficial for very long captures.
Soeren Apel [Mon, 13 Mar 2017 18:15:32 +0000 (19:15 +0100)]
TraceView: Use sticky scrolling setting directly
Soeren Apel [Mon, 13 Mar 2017 07:56:03 +0000 (08:56 +0100)]
Settings: Activate first item upon dialog creation
Soeren Apel [Mon, 13 Mar 2017 07:18:47 +0000 (08:18 +0100)]
Settings: Change icon for "Views"
Soeren Apel [Sun, 12 Mar 2017 20:32:35 +0000 (21:32 +0100)]
Tie the "sticky scrolling" setting in with the settings mgmt
Soeren Apel [Fri, 10 Mar 2017 07:52:02 +0000 (08:52 +0100)]
Settings: Change view settings shortcuts
Soeren Apel [Thu, 9 Mar 2017 18:38:20 +0000 (19:38 +0100)]
Integrate the about dialog into the settings dialog
Soeren Apel [Wed, 8 Mar 2017 21:53:51 +0000 (22:53 +0100)]
Settings: Prettify the settings dialog
Soeren Apel [Wed, 8 Mar 2017 08:44:16 +0000 (09:44 +0100)]
Session: Don't reset session name for file devices
Uwe Hermann [Fri, 10 Mar 2017 21:09:58 +0000 (22:09 +0100)]
Use the "default" keyword.
This patch was generated using clang-tidy:
clang-tidy -checks="-*,modernize-use-equals-default" -fix
(with manual fixups to move the "= default" to the .hpp)
Uwe Hermann [Fri, 10 Mar 2017 20:32:43 +0000 (21:32 +0100)]
Use emplace_back() where possible.
This patch was generated using clang-tidy:
clang-tidy -checks="-*,modernize-use-emplace" -fix
Using emplace_back() has multiple advantages:
- It's usually shorter and easier to read.
- It's more efficient.
V1: v.push_back("foo");
V2: v.emplace_back("foo");
V1 will construct a temporary std::string from the string literal "foo",
another copy of that temporary object will be constructed and placed
into the vector 'v', then the temporary object's destructor will be called.
V2 will simply create a std::string directly in the vector 'v', i.e.
there's only one construction (not 2) and no destructor needs to be called.
Uwe Hermann [Fri, 10 Mar 2017 20:41:30 +0000 (21:41 +0100)]
Use bool literals for boolean values.
This patch was generated using clang-tidy:
clang-tidy -checks="-*,modernize-use-bool-literals" -fix
Uwe Hermann [Fri, 10 Mar 2017 20:17:22 +0000 (21:17 +0100)]
Don't use redundant void argument.
This patch was generated using clang-tidy:
clang-tidy -checks="-*,modernize-redundant-void-arg" -fix
Uwe Hermann [Fri, 10 Mar 2017 19:26:31 +0000 (20:26 +0100)]
Prefer std::make_shared().
This patch was generated using clang-tidy:
clang-tidy -checks="-*,modernize-make-shared" -fix
(with some additional manual fixups)
Using make_shared() over manual construction has multiple advantages:
- It's shorter to write and easier to read.
V1: auto sb = shared_ptr<Foo>(new Foo());
V2: auto sb = make_shared<Foo>();
- The type "Foo" is repeated less often (less code duplication, lower
risk of forgetting to update one of the "Foo"s upon copy-paste etc.)
- Manual construction leads to two individual allocations (actual data and
the control block of the shared_ptr). Using make_shared() will only lead
to one allocation, which has performance, cache-locality and memory
consumption benefits.
- It's exception-safe, whereas manual construction is not necessarily:
V1: func(shared_ptr<Foo>(new Foo()), shared_ptr<Foo>(new Foo()));
V2: func(make_shared<Foo>(), make_shared<Foo>());
In "V1", one of the "new" invocations could throw, potentially
causing memory leaks. No leaks will happen with make_shared().
Uwe Hermann [Thu, 9 Mar 2017 23:34:10 +0000 (00:34 +0100)]
Don't use deprecated headers.
This patch was generated using clang-tidy:
clang-tidy -checks="-*,modernize-deprecated-headers" -fix
(with some additional manual fixups)
Uwe Hermann [Thu, 9 Mar 2017 23:11:45 +0000 (00:11 +0100)]
Use nullptr in a few places.
This patch was generated using clang-tidy:
clang-tidy -checks="-*,modernize-use-nullptr" -fix
Soeren Apel [Tue, 7 Mar 2017 21:14:49 +0000 (22:14 +0100)]
GlobalSettings: Implement undo function for the "cancel" button
Soeren Apel [Mon, 6 Mar 2017 18:07:36 +0000 (19:07 +0100)]
TraceView: Fix "always zoom to fit" feature
Soeren Apel [Sun, 5 Mar 2017 20:16:56 +0000 (21:16 +0100)]
TraceView: Only perform "always zoom to fit" for the main view
Soeren Apel [Sun, 5 Mar 2017 20:07:23 +0000 (21:07 +0100)]
Introduce ViewBase::is_main_view
Soeren Apel [Sun, 5 Mar 2017 19:54:51 +0000 (20:54 +0100)]
MainWindow: Restructure add_view()
Soeren Apel [Sun, 5 Mar 2017 19:30:34 +0000 (20:30 +0100)]
Tie the "always zoom to fit" setting in with the settings mgmt
Soeren Apel [Sun, 5 Mar 2017 18:58:37 +0000 (19:58 +0100)]
Tie the "use coloured bg" setting in with the settings mgmt
Soeren Apel [Mon, 6 Mar 2017 18:04:47 +0000 (19:04 +0100)]
Implement initial version of the settings management
Soeren Apel [Sat, 4 Mar 2017 15:29:36 +0000 (16:29 +0100)]
Manpage update
Soeren Apel [Thu, 2 Mar 2017 22:07:53 +0000 (23:07 +0100)]
Fix #829 by not throwing when device can't be used
Soeren Apel [Sat, 25 Feb 2017 21:55:30 +0000 (22:55 +0100)]
Update sr_period_string usage
Uwe Hermann [Mon, 6 Mar 2017 07:41:42 +0000 (08:41 +0100)]
Increase decoding chunk size for much better performance.
Increasing the (max) decoding chunk size from 4ksamples to 10Msamples
leads to massively faster protocol decoding due to reduced overhead
related to srd_session_send() and other functions invoked internally.
In some cases a 2x (or more) speed-up has been observed.
Piotr Esden-Tempski [Sat, 4 Mar 2017 09:06:22 +0000 (01:06 -0800)]
Bring back sticky scroll and coloured background shortcuts.
Converted the actions to QShortcut. We do not use the actions anywhere
else in the code and they were not being triggered using the setShortcut
setting. Additionally expanded the view background color to be a
toggleable attribute.
This fixes bugs #907 and #908.
Uwe Hermann [Fri, 3 Mar 2017 23:32:43 +0000 (00:32 +0100)]
Name session tabs "Session 1" per default.
This is a bit more specific than "Untitled-1".
Uwe Hermann [Fri, 3 Mar 2017 23:26:35 +0000 (00:26 +0100)]
manpage: Document CTRL+w for closing session tabs.
Piotr Esden-Tempski [Fri, 3 Mar 2017 07:31:04 +0000 (23:31 -0800)]
Added Ctrl-Q and Ctrl-W shortcuts.
Ctrl-Q is commonly used to close the application, and Ctrl-W usually is
used to close the current tab. According to the Qt::Modifier
documentation this setup should work seamlessly on Mac OS where Meta is
usually used in place of Ctrl.
This fixes bug #899.
Piotr Esden-Tempski [Fri, 3 Mar 2017 01:55:55 +0000 (17:55 -0800)]
Add Run/Stop shortcut.
This is a proposed solution to reenable the <Space> shortcut for
Run/Stop. It seems that setShortcut on QToolButton is not working, but
it seems that adding QShortcut works as a workaround.
Marcus Comstedt [Sun, 26 Feb 2017 13:31:02 +0000 (14:31 +0100)]
DecoderStack: Avoid re-feeding old data after wait_for_data()
This fixes #876 and #850.
Soeren Apel [Sun, 19 Feb 2017 20:19:11 +0000 (21:19 +0100)]
Segment: Do not alter chunks when there are active iterators
Soeren Apel [Sat, 18 Feb 2017 23:37:08 +0000 (00:37 +0100)]
View: Fix view item positioning
Soeren Apel [Sat, 18 Feb 2017 07:21:00 +0000 (08:21 +0100)]
Segment: Move definition of MaxChunkSize
This fixes a compile error with clang:
pv/data/segment.cpp.o: In function `unsigned long const& std::min<unsigned long>(unsigned long const&, unsigned long const&)':
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_algobase.h:200: undefined reference to `pv::data::Segment::MaxChunkSize'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Uwe Hermann [Fri, 17 Feb 2017 08:27:20 +0000 (09:27 +0100)]
pulseview_cross.nsi.in: Use Python 3.4 (Windows XP support).
The last Python version to officially support Windows XP was 3.4.x.
We'll keep the Windows installers at that version for the time being,
until Windows XP support is no longer feasible (e.g. because important
sigrok requirements such as Qt, glib, or libusb drop XP suppport).
Soeren Apel [Tue, 14 Feb 2017 20:03:50 +0000 (21:03 +0100)]
Update unit tests
Soeren Apel [Mon, 13 Feb 2017 23:12:54 +0000 (00:12 +0100)]
AnalogSignal: Split up divs during autoranging if needed
Soeren Apel [Mon, 13 Feb 2017 23:07:55 +0000 (00:07 +0100)]
AnalogSegment: Calculate min/max also for small sample sizes
Soeren Apel [Mon, 13 Feb 2017 22:39:13 +0000 (23:39 +0100)]
Perform autoranging for analog traces also when new data comes in
Soeren Apel [Mon, 13 Feb 2017 22:26:31 +0000 (23:26 +0100)]
Provide notifiers for when signal data changes
Soeren Apel [Sun, 12 Feb 2017 17:29:47 +0000 (18:29 +0100)]
Implement autoranging for analog channels
Soeren Apel [Fri, 10 Feb 2017 19:28:20 +0000 (20:28 +0100)]
StoreSession: Remove outdated comment
Soeren Apel [Fri, 10 Feb 2017 19:22:51 +0000 (20:22 +0100)]
MainBar: Properly limit the lower value of the sample range
This fixes bug #890.
Soeren Apel [Fri, 10 Feb 2017 07:09:55 +0000 (08:09 +0100)]
Session: Handle frame markers properly
Soeren Apel [Wed, 8 Feb 2017 21:16:39 +0000 (22:16 +0100)]
AnalogSignal: Allow separate vdiv counts for pos/neg
Soeren Apel [Wed, 8 Feb 2017 20:53:08 +0000 (21:53 +0100)]
MainBar: Make sure device and GUI are in sync on startup
Soeren Apel [Wed, 8 Feb 2017 19:33:48 +0000 (20:33 +0100)]
Free unused segment memory after acquisition
Segments allocate chunks of MaxChunkSize bytes each.
Most likely, the last allocated chunk isn't fully used,
so there's memory going to waste. This patch fixes this
by allocating a chunk of the required size that replaces
the last standard chunk.
Soeren Apel [Wed, 8 Feb 2017 17:35:40 +0000 (18:35 +0100)]
Tests: Add tests for Segment class
Soeren Apel [Wed, 8 Feb 2017 17:30:41 +0000 (18:30 +0100)]
Switch segment storage from single vector to vector of arrays
Previously, PV would run out of storage space for the data
segments because data was stored in a vector. As a vector allows
contiguous access to the underlying data (much like an array),
it needs a contiguous section of memory. With incoming data and
constant resizing of the vector, the OS at some point can no
longer supply such a section of memory, causing PV to abort
acquisition.
This change fixes this by using several chunks that are never
grown in size. Instead, new chunks are allocated and added to
the vector as needed. This way, the OS will be able to provide
memory until it runs out of system memory.
Soeren Apel [Sun, 22 Jan 2017 20:32:05 +0000 (21:32 +0100)]
Unify get_samples() semantics for AnalogSegment and LogicSegment
Uwe Hermann [Thu, 2 Feb 2017 21:28:57 +0000 (22:28 +0100)]
pulseview_cross.nsi.in: Bump Python version to 3.6.
Uwe Hermann [Sun, 29 Jan 2017 18:36:59 +0000 (19:36 +0100)]
Build fixes for Qt5 Windows/mingw/MXE support.
We currently need to (ab)use pkg-config to get all the required
Qt5 static linking dependencies right, since this doesn't yet
work properly in MXE's cmake.
We use ${PKGDEPS_STATIC_LDFLAGS} instead of ${PKGDEPS_STATIC_LIBRARIES}
to avoid some linker issues related to libbz2.
We need to add Qt5::QSvgPlugin, Qt5::QWindowsIntegrationPlugin,
Qt5PlatformSupport and all the Qt5 libs and their dependencies to
the link libraries list (for both PulseView and the unit tests).
In one of the source code files we need to explicitly list all
static Qt plugins via Q_IMPORT_PLUGIN to make static builds work,
which is currently QWindowsIntegrationPlugin and QSvgPlugin.
We're only focusing on having a working Qt5 build for Windows,
as we no longer need to or want to support Qt4 there.
Details:
https://github.com/mxe/mxe/issues/1642
Thanks to Tony Theodore for the help!
This should also fix bug #871, since we're now building with Qt >= 5.6
which has high-DPI support in general.
Tested via manual specification (might need further changes, though):
set QT_SCALE_FACTOR=2
pulseview.exe
Soeren Apel [Fri, 20 Jan 2017 09:59:50 +0000 (10:59 +0100)]
Confirm with user also when trying to close the session's main dock
Soeren Apel [Thu, 19 Jan 2017 21:01:43 +0000 (22:01 +0100)]
Confirm with user when trying to close sessions with unsaved data
Soeren Apel [Tue, 17 Jan 2017 21:05:41 +0000 (22:05 +0100)]
MainWindow: Improve view removal
Soeren Apel [Fri, 13 Jan 2017 17:36:00 +0000 (18:36 +0100)]
TraceView: Center traces more than once
This is to make sure the traces are centered when the view is
first drawn but also properly centered when the final size is
known. This fixes a "jumping" display when opening a new trace
view in addition to an existing one.
Soeren Apel [Fri, 13 Jan 2017 07:51:00 +0000 (08:51 +0100)]
TraceView: Center traces vertically after view creation
Soeren Apel [Thu, 12 Jan 2017 21:59:31 +0000 (22:59 +0100)]
TraceView: Fix variable name
Soeren Apel [Thu, 12 Jan 2017 21:57:31 +0000 (22:57 +0100)]
TraceView: Restore vertical offset
Gerhard Sittig [Thu, 20 Oct 2016 07:53:43 +0000 (09:53 +0200)]
license: remove FSF postal address from boiler plate license text
Remove the FSF postal address as it might change (it did in the past).
Reference the gnu.org website instead which is more stable.
Perttu Ahola [Sat, 24 Dec 2016 19:31:05 +0000 (21:31 +0200)]
MainWindow, View::View: Fix two memory errors reported by valgrind
(use of freed data, use of uninitialized variable)
Soeren Apel [Fri, 9 Dec 2016 17:19:28 +0000 (18:19 +0100)]
Add tooltips
Soeren Apel [Tue, 6 Dec 2016 06:35:36 +0000 (07:35 +0100)]
Fix unit tests
Soeren Apel [Sun, 4 Dec 2016 18:45:30 +0000 (19:45 +0100)]
DecoderStack: Fix "data may be unitialized" error
Soeren Apel [Sun, 4 Dec 2016 13:38:32 +0000 (14:38 +0100)]
MainWindow: Fix "main_window may be uninitialized" error
Soeren Apel [Wed, 30 Nov 2016 07:32:56 +0000 (08:32 +0100)]
MainBar: Correct event handler name
Soeren Apel [Wed, 30 Nov 2016 07:23:56 +0000 (08:23 +0100)]
Fix "always zoom to fit" feature
Soeren Apel [Mon, 28 Nov 2016 19:02:17 +0000 (20:02 +0100)]
Implement views::trace::StandardBar and derive MainBar from it
Soeren Apel [Fri, 25 Nov 2016 17:42:38 +0000 (18:42 +0100)]
Move file loading from MainBar to Session
Soeren Apel [Thu, 24 Nov 2016 19:02:06 +0000 (20:02 +0100)]
Do not change session name when performing only a selective save
Soeren Apel [Thu, 24 Nov 2016 17:42:24 +0000 (18:42 +0100)]
Fix #849 by making sure no references to the DecodeTrace instance remain
Soeren Apel [Fri, 4 Nov 2016 17:21:37 +0000 (18:21 +0100)]
MainWindow: Update tab text when session name changes
Soeren Apel [Fri, 4 Nov 2016 17:00:08 +0000 (18:00 +0100)]
DecoderStack: Remove unneeded shared_ptr use
Soeren Apel [Fri, 4 Nov 2016 09:35:27 +0000 (10:35 +0100)]
DecodeTrace: Remove unneeded pointer to the signalbase instance
Soeren Apel [Tue, 18 Oct 2016 15:27:14 +0000 (17:27 +0200)]
MainWindow: Add settings button
Soeren Apel [Tue, 18 Oct 2016 06:47:02 +0000 (08:47 +0200)]
MainWindow: Add separator
Soeren Apel [Tue, 11 Oct 2016 13:55:55 +0000 (15:55 +0200)]
MainWindow: Don't use get_active_view() to determine active session
While it would be neat if it worked, it unfortunately doesn't as
the currently focused item may not be related to any view - e.g.
when one of the tabs of the QTabWidget was clicked.
For this reason, we store the last session the user interacted
with and treat it as the currently focused session.
Soeren Apel [Tue, 11 Oct 2016 13:47:53 +0000 (15:47 +0200)]
MainWindow: Fix session error slot declaration
Soeren Apel [Mon, 10 Oct 2016 17:22:38 +0000 (19:22 +0200)]
Move run/stop button from the menu bar to the tab widget
Soeren Apel [Mon, 10 Oct 2016 10:00:35 +0000 (12:00 +0200)]
MainWindow: Select new session after creation
Soeren Apel [Mon, 10 Oct 2016 07:15:04 +0000 (09:15 +0200)]
MainWindow: Prevent the QTabWidget from collapsing when empty
Soeren Apel [Sun, 9 Oct 2016 18:55:19 +0000 (20:55 +0200)]
MainWindow: Update session tab when focusing a different view
Soeren Apel [Sat, 8 Oct 2016 13:47:12 +0000 (15:47 +0200)]
Move the "new session" button to the main window's tab area
Soeren Apel [Tue, 4 Oct 2016 17:52:56 +0000 (19:52 +0200)]
MainWindow: Fix dock nesting
The nesting flag was applied to the wrong QMainWindow
after the introduction of the tab widget.
Soeren Apel [Tue, 4 Oct 2016 17:52:29 +0000 (19:52 +0200)]
MainWindow: Allow tabs to be closed
Soeren Apel [Tue, 4 Oct 2016 17:32:58 +0000 (19:32 +0200)]
MainWindow: Use regular pointer for QDockWidgets
Using shared_ptrs conflicts with the Qt memory management,
so we can't use them if we don't have control over when
those objects are deleted by Qt. In this case, we need to
handle the dock widgets properly.
Soeren Apel [Thu, 29 Sep 2016 17:36:48 +0000 (19:36 +0200)]
MainWindow: Use a QTabWidget to display the QDockWidgets
Soeren Apel [Mon, 26 Sep 2016 06:45:38 +0000 (08:45 +0200)]
Change namespace for the trace view and implement ViewBase
Soeren Apel [Mon, 12 Sep 2016 19:42:59 +0000 (21:42 +0200)]
MainWindow: Make session naming consistent
Uwe Hermann [Sat, 3 Dec 2016 21:23:24 +0000 (22:23 +0100)]
CMakeLists.txt: Avoid -fext-numeric-literals, (not supported by clang).
This (re-)fixes bug #863.
Uwe Hermann [Fri, 4 Nov 2016 22:46:08 +0000 (23:46 +0100)]
Workaround for a gcc 6.2.1 bug causing boost-related build issues.
Patch provided by Aurélien Jacobs, thanks a lot!
This fixes bug #863.
Gerhard Sittig [Thu, 13 Oct 2016 14:25:39 +0000 (16:25 +0200)]
cmake, INSTALL: Bump the Boost requirement to >= 1.55.
Support for serialization of multiprecision data (which is used for view
timestamps) was introduced in boost version 1.55. Since commit
3a21afa6
builds with versions up to and including 1.54 are reported to fail.
Bump the required version from 1.53 to 1.55. Rephrase the CMake logic
which searches for the Boost dependency. Create a list of libraries from
fixed and optional parts, which as a byproduct avoids long lines. Pass
that list of required libraries to one common find_package() call.
Signed-off-by: Gerhard Sittig <gerhard.sittig@gmx.net>
Uwe Hermann [Sun, 4 Sep 2016 14:15:47 +0000 (16:15 +0200)]
INSTALL: Add new libboost-serialization dependency.
Soeren Apel [Sun, 4 Sep 2016 12:49:29 +0000 (14:49 +0200)]
MainWindow: Fix crash on closing last session