Soeren Apel [Sat, 12 Dec 2015 14:01:03 +0000 (15:01 +0100)]
Session: Allow using sample rate from meta packet
Currently, PV only looks at the device config to determine the
sample rate. This breaks as input filters submit meta packets
containing the sample rate and provide no device config.
Example: load any file in PV using the raw binary input filter
and set the sample rate to anything but 0. PV will still show
'sa' as the time unit, indicating that it dismisses the sample
rate information sent in the meta packet.
This patch makes this work by using the sample rate if it
wasn't already set from the device config.
Tilman Sauerbeck [Mon, 23 Nov 2015 18:07:59 +0000 (19:07 +0100)]
LogicSignal: Put all trigger matches into a single trigger stage.
Previously each trigger match was assigned its own trigger stage,
which is problematic because devices may not support more than one
stage.
Ideally we would want the user to decide which matches go into
which stages, but that's a long way off and this change makes
things work just a little bit better for more devices.
This will be used in a follow-up changeset for the markers that
visualize the time of SR_DF_TRIGGER.
Note that this copies a little code from the TimeMarker class,
but that seemed a better idea than deriving from it and disabling
the popup and label-drawing code.
Soeren Apel [Thu, 5 Nov 2015 18:14:46 +0000 (19:14 +0100)]
StoreSession: Observe proper range order
When I wrote the original solution I wanted min() and abs()
to take care of this issue. However, I forgot that abs()
works on a difference of two uint64_t, so this subtraction
will underflow if the range is in the wrong order.
Converting them to int64_t isn't a good solution, so I'm now
using an ordinary condition instead.
Daniel Elstner [Mon, 2 Nov 2015 21:14:39 +0000 (22:14 +0100)]
build: Limit auto-versioning to git revision hash
When building from a git checkout and HEAD does not exactly match
a tag, append the shortened revision hash to the hardcoded version
string. Do not attempt to provide any information beyond that.
This brings the PulseView versioning in line with the other modules
in the sigrok stack.
Aurelien Jacobs [Sat, 24 Oct 2015 20:18:42 +0000 (22:18 +0200)]
avoid using deprecated std::autoptr
This fixes the following g++-5 warning:
pv/dialogs/about.hpp:51:7: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
std::auto_ptr<QTextDocument> supportedDoc;
Marcus Comstedt [Wed, 30 Sep 2015 18:22:58 +0000 (20:22 +0200)]
android: Fix copylibs task to include the right libs
Since more and more libs are losing their versioned soname, the
heuristic of including libs with versioned sonames is an increasingly
poor one. Instead, simply blacklist the libs we do not want.
ViewItem: Adjust the threshold between dark and light colors
Previously, the function returned 'Qt::black' for all used colors except
when black itself was passed in, making the text on brown, blue or violet
backgrounds very hard to read.
The formatting depending on the distance between two timestamps is
reintroduced with the responding function residing in the 'Ruler' class
(the prime user of that function).
Fixes a rounding bug for the least significant digit in the
'format_time_minutes()' function.
The 'Cursor' and 'CursorPair' classes now use the same precision when
formatting timestamps as the rest of the program.
Jens Steinhauser [Sun, 30 Aug 2015 12:16:11 +0000 (14:16 +0200)]
Ruler: Fix tick mark calculation
Prior to this change, due to floating point errors the loop that
calculates the tick mark positions could loop thousands of iterations
while zooming in at high time values, blocking the whole UI and leading
to distorted text in the end.
Jens Steinhauser [Fri, 28 Aug 2015 15:34:29 +0000 (17:34 +0200)]
Remove unused arguments from 'format_time()'
This function is already complicated enough (it tries to guess in what
context it is currently used and changes its behaviour accordingly), so
remove the unused parameters to make it somewhat comprehensible.
Fix #605 by closing current device when another is selected
As the device manager class holds a pointer to all devices
they will never be destroyed until PV exits. Devices are
opened with the first call to create() but only closed in
the destructor. Together, this results in devices never
being closed.
This patch fixes this by renaming create() to open()
and introducing a matching close() method that the
session class calls when a different device is to be
selected.