Commit Graph

2009 Commits

Author SHA1 Message Date
Gerhard Sittig e2e4a66a86 Android: implement chained log callbacks (buffer and terminal output)
Query the libraries' default log handlers before registering the
application's own handler. Queue log messages in the application's
internal buffer _and_ hand them to the default handlers which send
the text to stdout as well.
2018-08-30 19:17:20 +02:00
Gerhard Sittig 4b9234088f Logging: obsolete -s, log to internal buffer as well as stdout
Query the sr and srd libraries' current log routines before registering
PV's own log callback which queues messages in an internal buffer. This
allows duplication of messages to the internal buffer _and_ stdout, and
thus obsoletes the -s option.
2018-08-30 19:17:20 +02:00
Uwe Hermann 764596c46b pulseview.qrc: Add missing files. 2018-08-28 18:30:00 +02:00
Soeren Apel 556259d2d0 Implement decode pausing/resuming 2018-08-22 21:28:10 +02:00
Soeren Apel 2d20774fe2 Fix two warnings 2018-08-21 21:04:22 +02:00
Soeren Apel 119c5c232e Fix item dragging 2018-08-21 12:02:38 +02:00
Soeren Apel a20c1fcc6c Replace (double)0 by 0.0 2018-08-21 12:02:38 +02:00
Soeren Apel 82e7f4b3f6 AnalogSignal: Set initial value for the "value at cursor" variable
Without this, the analog traces show random values after startup
until the mouse cursor enters the application window and the cursor
position updates.
2018-08-21 12:02:38 +02:00
Soeren Apel ea50cdfc65 Fix #1259 by not silently ignoring file read errors 2018-08-21 12:02:38 +02:00
Soeren Apel 73078ef7c8 Enum: Use slider instead of combo box for contiguous ranges 2018-08-21 12:02:38 +02:00
Soeren Apel c31d9f6a38 MainBar: Disallow negative sample rates 2018-08-21 12:02:38 +02:00
Soeren Apel 220801e962 MainBar: Disable custom samplerate by default
Without this, the edit may be left in editable mode once the
external clock was enabled and disabled again.
2018-08-21 12:02:38 +02:00
Soeren Apel c78081004d MainBar: Fix warning message introduced by bc4b9ccfc7
"sr: hwdriver: Option 'external_clock' not available for this device instance."
Avoid this message by checking if the EXTERNAL_CLOCK property is actually
supplied by the driver.
2018-08-21 12:02:38 +02:00
Soeren Apel 99ba5f2845 DecodeTrace: Implement annotation export for cursor range 2018-08-21 12:02:38 +02:00
Soeren Apel cbd9ec7f75 Fix regression introduced by 2980ff2da269c9ed
The regression was that when clicking+dragging on a trace in the
trace view area, the individual trace was moving, not the view area
itself. This was unintended.
2018-08-21 12:02:38 +02:00
Soeren Apel 30fe44fbfb Segment: Catch by reference 2018-08-21 12:02:38 +02:00
Soeren Apel 5a914348e8 Implement annotation export for all rows
Needed parts are:
1) Annotations must have a reference to the row they belong to
2) DecodeSignal must offer a method to return annotations for all rows
3) Annotations must become comparable to allow for sorting
4) DecodeTrace must handle the different annotation export cases
2018-08-21 12:02:38 +02:00
Soeren Apel 1ed996b433 Make annotation export customizable 2018-08-21 12:02:38 +02:00
Soeren Apel be843692f6 Implement annotation export from the DecodeTrace context menu 2018-08-21 12:02:38 +02:00
Soeren Apel 9e773fecf2 Rename create_context_menu() to create_header_context_menu() 2018-08-21 12:02:38 +02:00
Soeren Apel d9b55cc8ab Allow for a context menu in the view area 2018-08-21 12:02:38 +02:00
Soeren Apel 68e0a53ee4 Fix #1204 by making sure the lazy event handler is fired
The QTimer reference says about QTimer::start():

> Starts or restarts the timer with the timeout specified in interval.
> If the timer is already running, it will be stopped and restarted.
> If singleShot is true, the timer will be activated only once.

This suggests that the timer is reset when start() is called even
when it is in single shot mode. However, this is actually not the case
and start() doesn't appear to be doing anything if it has already
been started. While this works in most cases, it causes issues when
the timer is supposed to be reset and timeout at the specified time
since view items are still in flux.

Adding a stop() before the start() fixes this.
2018-08-21 12:02:38 +02:00
Uwe Hermann 7d9dd6f4f6 about: Layout change to use space more efficiently. 2018-08-19 18:41:27 +02:00
Uwe Hermann d3d55ad3db about: Merge all version info into one section. 2018-08-19 18:41:22 +02:00
Gerhard Sittig b804a6da85 about: move Pulseview version information into the text box
Move the application's version information out of the caption and into
the text box. So that it resides with the libraries' version information,
and is accessible via clipboard for reports.

This addresses part of bug #1213, and fixes all of #1264.
2018-08-19 17:40:43 +02:00
Uwe Hermann 5c3c8c1ef5 CMakeLists.txt: Set DISABLE_WERROR to TRUE by default.
There's various compile problems that can result from building with
-Werror on by default, which are outside of our control (e.g. that need
to be fixed in external libraries), for example #1144 or 1145.
2018-08-19 17:39:27 +02:00
Uwe Hermann 2a09e77148 HardwareDevice: Only show non-empty device name components.
Fields such as vendor, version, serial number etc. are not always
provided by drivers. Avoid printing them, since it causes stray
whitespace to be added to the displayed strings.
2018-07-24 22:09:51 +02:00
Uwe Hermann ab89256886 HardwareDevice: Make serial number display a bit clearer. 2018-07-24 22:09:46 +02:00
Brian Starkey 16a832bc5b Fix the build - catch exceptions by reference
Fix the following build errors seen with gcc 8.1.1:

 error: catching polymorphic type ‘class std::out_of_range’ by value
 error: catching polymorphic type ‘class boost::archive::archive_exception’ by value

Signed-off-by: Brian Starkey <stark3y@gmail.com>
2018-07-24 20:54:26 +02:00
Soeren Apel 521bac13ae Fix #1146 by replacing the check box by a combo box 2018-07-21 18:57:21 +02:00
Soeren Apel cc844e8612 Remove non-functional remains of the scale drag handle 2018-07-21 18:57:21 +02:00
Soeren Apel 7ceb2376de Channel popup: Don't disable channels when clicking the enable buttons 2018-07-21 18:57:21 +02:00
Soeren Apel 2099158e1e View: Don't set scroll defaults more than once 2018-07-21 18:57:21 +02:00
Soeren Apel f98070844c Make sure PD row colors remain constant by adding a row index
Without this change, PD row colors depend on the visible rows,
not a constant ID. This means that rows that collapse change the
colors of all rows coming after them.
2018-07-21 18:57:21 +02:00
Soeren Apel bc4b9ccfc7 Accept user-entered sample rates when external clock is enabled 2018-07-21 18:57:21 +02:00
Soeren Apel 1ae1830184 Properly handle decoder errors 2018-07-21 18:57:21 +02:00
Soeren Apel b82908abf7 DecodeSignal: Add and use inclusive/exclusive sample count variant
This is needed because the annotation cache must be operating on the
number of decoded samples WITHOUT the ones being currently processed,
otherwise it'll refuse to refresh the cache, even if more annotations
arrive - it uses the sample count to determine the cache state.

However, the bar showing the undecoded area must operate on the number
of samples WITH the ones being currently processed so that annotations
aren't overlapping with it.

Adding the parameter to DecodeSignal::get_decoded_sample_count() allows
for both.

This relates to e06cf18db7.
2018-07-21 18:57:21 +02:00
Soeren Apel 76f33d4c67 Connect dialog: Let the device list occupy only the minimum space needed 2018-07-21 18:57:21 +02:00
Soeren Apel cab7bc996c LogicSignal: Don't paint hover marker if channel is disabled 2018-07-21 18:57:21 +02:00
Soeren Apel 2c39cfe261 Fix #975 by overallocating memory to leave spare for PV to use 2018-07-21 18:57:21 +02:00
Gerhard Sittig 844c4619dd cmake: help users by pointing out libsigrok build depencendies
It appears that users have trouble to relate failed PulseView builds to
missing dependencies during libsigrok configuration. Although the error
occurs early and is stated in the build output, it only gets noticed
late and users forgot about the earlier step, or never bothered to check.

Explicitly test for the availability of the C++ bindings, and print a
message that points to libsigrok's(!) configuration phase. Another
check for the full set of libraries will fail in fatal ways as before.

An unfortunate implementation detail of the cmake check leaves all parts
of the lookup result empty when either(!) of the tested libs is missing.
So we cannot tell with certainty which test failed when the test result
is negative while a list of libraries was passed to the test. That's why
the "soft" individual test with QUIET and without REQUIRED is the least
intrusive adjustment to existing CMake rules, where other locations
depend on the PKGDEPS_* variables.

This change addresses bug #1199.
2018-07-04 13:02:08 +02:00
Gerhard Sittig 1e3a52e3df cmake: nit, use the message(STATUS) keyword 2018-06-19 18:53:43 +02:00
Gerhard Sittig 6a96e1b2b5 main.cpp: straighten the getopt/optind adjustment before openfiles
The pulseview(1) application accepts input file specs either as argument
to the -i option, or as positional arguments after the command line options.

Simplify the logic which collects remaining non-option command line words
after getopt(3) is done. As a byproduct the application code no longer
manipulates a variable that is owned by an external library.
2018-06-19 18:49:50 +02:00
Gerhard Sittig 6f054e926c analogsignal.cpp: Fix std::isnan() related compile issue on some systems
Re-do for recent source what commit f9abacf20c did to solve bug #531.
Explicitly use std::isnan() in checks. Avoid the 'using' directive since
not all platforms that are supported by sigrok do support it.

  pv/views/trace/analogsignal.cpp:54:12: error: 'isnan' is already declared in this scope
2018-06-19 18:47:20 +02:00
Soeren Apel 4caaaacee3 Fix comment 2018-06-16 12:56:31 +02:00
Soeren Apel 99c4952654 Fix up change handler registration
Before, the mismatched registration/deregistration lead to
crashes. Example:

Load file, load another file into the same session,
change any setting -> crash because first change notifier is
called but invalid
2018-06-16 12:56:31 +02:00
Soeren Apel b9a3a67e4b Prevent log length to be set to 0
Doing so prevents PV from starting up, so disallow it
2018-06-16 12:56:31 +02:00
Soeren Apel 0cbadf1c6a AnalogSignal: Display value under cursor 2018-06-16 12:56:31 +02:00
Soeren Apel 2795de2e7f Fix #979 by querying trigger types only once and storing them 2018-06-15 21:42:29 +02:00
Soeren Apel 6b197c700a Fix #1226 by removing a misplaced trigger marker clear 2018-06-15 21:42:29 +02:00