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.
Soeren Apel [Fri, 28 Aug 2015 06:35:56 +0000 (08:35 +0200)]
Fix #592 completely by showing the actual error message
Before, the supplied infoMessage was ignored (unnamed parameter)
and instead the local variable infoMessage was used, which was
empty. For this reason, the cause of the error never showed.
Uwe Hermann [Fri, 21 Aug 2015 13:23:58 +0000 (15:23 +0200)]
Restore the default of "pulseview foo.sr" opening the file.
This used to work in e.g. the 0.2.0 release and is much more convenient
than having to supply "-i" for every file. It also allows for (easier, at
least) association of the .sr extension with PulseView on most OSes.
Soeren Apel [Sat, 15 Aug 2015 21:11:52 +0000 (23:11 +0200)]
View: Allow ScaleUnits[0] to actually be used
Without this patch, no major tick on the ruler will ever
begin with a '1' but only with '2' or '5'. This behavior
can also be observed with current sigrok git head, so it
is independent of my util/view/ruler patch set.
Soeren Apel [Sat, 15 Aug 2015 21:05:18 +0000 (23:05 +0200)]
View: Use max time to calculate label length, not offset_
Using offset_ gives false results, in particular when
offset_ happens to be 0. With this fix, realistic values
are used for the label length calculation.