Soeren Apel [Fri, 8 Jun 2018 07:09:09 +0000 (09:09 +0200)]
Disable unit tests by default
The rationale for this change is that except for developers, pretty
much everyone who builds from source does so because they want to
use the latest changes. However, only developers care about the results
of the unit tests, so this doubles the build time for users without
any real benefit.
Even worse, the unit tests are known to fail on several hosts for
reasons that are within the realm of the unit tests themselves, not
because of broken code. This confuses users and even prevents them
from installing PV for no good reason.
Since the unit tests do still run on Jenkins, there's little to no
coverage gap in my opinion.
Soeren Apel [Tue, 5 Jun 2018 21:11:03 +0000 (23:11 +0200)]
Fix #770 by adding a vertical hover line and a setting for it
Soeren Apel [Tue, 5 Jun 2018 16:49:12 +0000 (18:49 +0200)]
Fix #1040 by allowing multiple files to be loaded from command line
Soeren Apel [Tue, 5 Jun 2018 14:57:31 +0000 (16:57 +0200)]
Fix #1166 by using the correct array size
Soeren Apel [Mon, 4 Jun 2018 16:33:43 +0000 (18:33 +0200)]
Session: Handle failing sigrok::Device::read_config() calls
Uwe Hermann [Tue, 5 Jun 2018 22:25:41 +0000 (00:25 +0200)]
device.cpp: Add SR_CONF_EXTERNAL_CLOCK_SOURCE.
Uwe Hermann [Sun, 3 Jun 2018 17:39:12 +0000 (19:39 +0200)]
device.cpp: Add missing SR_CONF_DATA_SOURCE entry.
Soeren Apel [Sat, 2 Jun 2018 21:30:57 +0000 (23:30 +0200)]
Fix #1198 by removing the 1:1 zoom button
Soeren Apel [Sat, 2 Jun 2018 20:12:36 +0000 (22:12 +0200)]
Fix #807 by disabling trigger widgets when session is not stopped
Soeren Apel [Sat, 2 Jun 2018 19:52:24 +0000 (21:52 +0200)]
Update cursor action's state whenever the cursor state changes
Brian Starkey [Fri, 1 Jun 2018 17:33:08 +0000 (18:33 +0100)]
Fix #1212 by not resetting the cursors pointer
Calling cursors_.reset() effectively drops the CursorPair, meaning they
can never be used. Remove that.
Soeren Apel [Wed, 30 May 2018 21:16:57 +0000 (23:16 +0200)]
Fix #540 by introducing a method to reset the view state
Soeren Apel [Wed, 30 May 2018 15:55:32 +0000 (17:55 +0200)]
Fix #956 by adding the missing final sample to the range
Soeren Apel [Sun, 27 May 2018 08:00:42 +0000 (10:00 +0200)]
Fix #1201 by letting more accurate matches replace previous ones
Soeren Apel [Sun, 27 May 2018 06:49:17 +0000 (08:49 +0200)]
Fix #1182 by only considering enabled channels
Soeren Apel [Sat, 26 May 2018 18:49:37 +0000 (20:49 +0200)]
Fix #1203 by catching the boost exception thrown on error
Soeren Apel [Fri, 25 May 2018 14:07:24 +0000 (16:07 +0200)]
Add imported files to the session save/restore mechanism
This commit also makes the file loading more robust by improving
the handling of cases where files can't be loaded.
Soeren Apel [Wed, 23 May 2018 19:44:19 +0000 (21:44 +0200)]
StoreProgress: Add missing log output
Soeren Apel [Tue, 22 May 2018 07:24:13 +0000 (09:24 +0200)]
Session: Allow an SR_DF_META packet to override the samplerate
Otherwise, the sample rate determined by the read_config() call
in Session::sample_thread_proc() will be kept even if it's wrong
and the driver wants to submit the correct one.
Uwe Hermann [Mon, 21 May 2018 14:38:13 +0000 (16:38 +0200)]
tracegroup.cpp: Fix a potential unintended integer division.
Reported by Coverity (CID 279773):
Result is not floating-point (UNINTENDED_INTEGER_DIVISION)
integer_division: Dividing integer expressions -5 and 2, and then
converting the integer quotient to type double. Any remainder, or
fractional part of the quotient, is ignored.
Uwe Hermann [Mon, 21 May 2018 14:36:55 +0000 (16:36 +0200)]
logicsegment.cpp: Constify a few variables.
Uwe Hermann [Mon, 21 May 2018 14:30:57 +0000 (16:30 +0200)]
LogicSegment::pow2_ceil(): Fix potentіal integer overflow.
Reported by Coverity (CID 50925):
Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression 1 << power
with type int (32 bits, signed) is evaluated using 32-bit arithmetic,
and then used in a context that expects an expression of type
uint64_t const (64 bits, unsigned).
Uwe Hermann [Sat, 19 May 2018 20:28:16 +0000 (22:28 +0200)]
cursorpair.cpp: Fix a clazy warning (-Wclazy-qstring-arg).
[...]/pv/views/trace/cursorpair.cpp:174:34: warning: Use multi-arg instead [-Wclazy-qstring-arg]
return QString("%1 / %2").arg(s1).arg(s2);
Uwe Hermann [Sat, 19 May 2018 20:26:51 +0000 (22:26 +0200)]
decodetrace.cpp: Drop unused "using std::all_of".
Reported by clang-tidy.
Uwe Hermann [Sat, 19 May 2018 18:36:39 +0000 (20:36 +0200)]
logicsegment.cpp: Suggest inlining of pack_sample()/unpack_sample().
These functions were not inlined by default (tested with gcc 7.3.0).
They're in a hot code path, so inlining can help with performance here.
Uwe Hermann [Sat, 19 May 2018 17:31:59 +0000 (19:31 +0200)]
logicsegment.cpp: Add missing config.h #include.
Without this #include, HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS was not
available and thus the faster path in LogicSegment::unpack_sample() and
LogicSegment::pack_sample() was never used.
Gerhard Sittig [Sat, 12 May 2018 06:31:52 +0000 (08:31 +0200)]
DecodeSignal: avoid specifying a zero samplerate to libsigrokdecode
When the sample rate is not known, avoid claiming the value would be
zero and calling setup routines in backend libraries. Although the call
is not strictly fatal, this simple check avoids potential log messages
at callee's for this unexpected condition.
Gerhard Sittig [Mon, 14 May 2018 18:25:41 +0000 (20:25 +0200)]
session: apply input format match to interactively loaded files, too
Move the format match logic from load_init_file() to load_file(), so
that it transparently takes effect on each "opened" file. Users still
can choose to "import" files and specify options when required. In the
case of lookup miss, sigrok session is assumed as before.
This fixes the remainder of bug #1015.
Gerhard Sittig [Sun, 13 May 2018 06:59:02 +0000 (08:59 +0200)]
session: add support to auto detect input format (for init file)
Extend the Session::load_init_file() method, to have the input format
automatically detected in the absence of an -I spec upon startup.
This fixes part of bug 1015. Input files specified at the command line
when pulseview gets invoked are handled. Files that interactively get
loaded while pulseview is running are not handled yet.
Soeren Apel [Mon, 7 May 2018 19:38:59 +0000 (21:38 +0200)]
Installer: Add debug shortcut for -l 5
Soeren Apel [Thu, 19 Apr 2018 21:31:42 +0000 (23:31 +0200)]
DecodeTrace: Use qreal instead of int for annotation drawing
This is to prevent "blinking" of annotations when they would merge into
blocks and break off of them again, noticeable when zooming in and out
using a track pad or touchscreen.
Soeren Apel [Thu, 19 Apr 2018 18:44:50 +0000 (20:44 +0200)]
DecodeTrace: Speed up painting by not copying the annotations
Soeren Apel [Sun, 6 May 2018 18:09:42 +0000 (20:09 +0200)]
Fix #1149 by handling "d" and "(dd)" types separately
Soeren Apel [Sun, 6 May 2018 17:40:10 +0000 (19:40 +0200)]
Update property widgets before showing device config popup
Soeren Apel [Fri, 4 May 2018 21:53:31 +0000 (23:53 +0200)]
DecodeSignal: Prevent out-of-range exception
Soeren Apel [Fri, 4 May 2018 06:58:59 +0000 (08:58 +0200)]
DecodeSignal: Re-set decoder metadata after stack termination
Soeren Apel [Tue, 24 Apr 2018 07:27:15 +0000 (09:27 +0200)]
LogicSegment: Readability changes
Soeren Apel [Sat, 21 Apr 2018 21:28:12 +0000 (23:28 +0200)]
Fix bar displaying undecoded area
Issue #1: As decoding happens while the trace is drawn, the
annotations may actually overlap with the bar because the number
of decoded samples is outdated.
Issue #2: The bar is a little too low and off-center.
Soeren Apel [Sat, 21 Apr 2018 15:13:30 +0000 (17:13 +0200)]
DecodeTrace: Remove unused members
Soeren Apel [Sat, 21 Apr 2018 09:09:11 +0000 (11:09 +0200)]
DecodeSignal: When lacking input, retry only when data is available
Soeren Apel [Fri, 20 Apr 2018 22:14:36 +0000 (00:14 +0200)]
Fix #1174 by performing shutdown speed optimizations
Soeren Apel [Thu, 19 Apr 2018 21:41:14 +0000 (23:41 +0200)]
Don't use qDebug().noquote() for now (bug #1169)
Soeren Apel [Wed, 18 Apr 2018 06:49:49 +0000 (08:49 +0200)]
Annotation: Use special type for the class, not plain int
Soeren Apel [Tue, 17 Apr 2018 20:23:23 +0000 (22:23 +0200)]
Fix #1162 by always submitting all changed options to libsrd
Uwe Hermann [Sun, 15 Apr 2018 15:10:26 +0000 (17:10 +0200)]
Channels popup: Use a more compact one-line button row.
Uwe Hermann [Sat, 14 Apr 2018 20:23:52 +0000 (22:23 +0200)]
inputfile: Increase chunk size from 16KB to 4MB.
Use a 4MB chunk size for reading a file into memory. Larger values don't
seem to provide any substancial performance improvements, but can cause
UI lag and a visually "stuttering" display of the data currently loading.
Uwe Hermann [Sat, 14 Apr 2018 20:20:43 +0000 (22:20 +0200)]
inputfile: Use a vector instead of an array on the stack.
Increasing the chunk size could cause issues when trying to put
large arrays on the stack.
Soeren Apel [Fri, 13 Apr 2018 17:00:13 +0000 (19:00 +0200)]
Fix #709 by deriving row/ann colors from the channel color
Soeren Apel [Fri, 13 Apr 2018 07:27:38 +0000 (09:27 +0200)]
Trace: Remove unneeded setters
Soeren Apel [Fri, 13 Apr 2018 07:13:07 +0000 (09:13 +0200)]
Channels: Add missing include
Soeren Apel [Wed, 11 Apr 2018 21:03:19 +0000 (23:03 +0200)]
SignalBase: Don't assume all channel settings are restorable
Soeren Apel [Tue, 10 Apr 2018 17:57:35 +0000 (19:57 +0200)]
Rename colour* to color*
Soeren Apel [Sat, 14 Apr 2018 17:35:20 +0000 (19:35 +0200)]
Centralize session error notification
Soeren Apel [Mon, 9 Apr 2018 16:50:28 +0000 (18:50 +0200)]
Fix #1153 by only showing drivers we'll actually scan
Soeren Apel [Sun, 15 Apr 2018 06:19:42 +0000 (08:19 +0200)]
Channels: Break up logic and analog channels into separate grids
This way, a named analog channel (e.g. "SDA analog") won't visually disturb
the alignment of the logic channels if there are only ungrouped channels.
To see this change in effect, you may compare using sainsmart_dds120_powerup_scl_analog.sr
Soeren Apel [Sun, 8 Apr 2018 21:03:33 +0000 (23:03 +0200)]
Channels: Let "Enable all changing" also check for sample data
Soeren Apel [Sun, 8 Apr 2018 20:33:42 +0000 (22:33 +0200)]
Channels: Don't use flat buttons and add vertical spacer
With the buttons being flat, users may not recognize the labels as
buttons intuitively. Hence, make the buttons explicitly appear as
such. To make the dialog more aesthetically pleasing, we add some
vertical space between the check boxes and the buttons.
Soeren Apel [Sun, 8 Apr 2018 20:00:06 +0000 (22:00 +0200)]
Channels: Re-arrange selector buttons
Soeren Apel [Sun, 8 Apr 2018 18:41:48 +0000 (20:41 +0200)]
Session: Don't process packets without sample data
Soeren Apel [Thu, 5 Apr 2018 20:23:28 +0000 (22:23 +0200)]
Fix #1023 by implementing filtering channel selectors
Soeren Apel [Thu, 5 Apr 2018 17:03:20 +0000 (19:03 +0200)]
DecodeSignal: Use srd_session_terminate_reset() for multi-segment data
Soeren Apel [Thu, 5 Apr 2018 07:07:36 +0000 (09:07 +0200)]
Apply option changes immediately, not on decode stack rebuild
Soeren Apel [Wed, 4 Apr 2018 17:07:27 +0000 (19:07 +0200)]
Add DecodeSignal and Session error logging
Soeren Apel [Sun, 1 Apr 2018 08:24:55 +0000 (10:24 +0200)]
Logging: Make logging thread-safe
Otherwise, we crash when two threads try to add entries to the log
at the same time.
Uwe Hermann [Sun, 1 Apr 2018 17:52:36 +0000 (19:52 +0200)]
view.cpp: Drop unneeded parenthesis.
Uwe Hermann [Sun, 1 Apr 2018 17:52:18 +0000 (19:52 +0200)]
Fix build with -DENABLE_DECODE=n.
Uwe Hermann [Sun, 1 Apr 2018 17:28:43 +0000 (19:28 +0200)]
Fix two clang-tidy warnings.
Uwe Hermann [Sun, 1 Apr 2018 17:26:16 +0000 (19:26 +0200)]
CMakeLists.txt: Set CMake policy CMP0054 to NEW.
This prevents the following warnings upon a second cmake run:
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/CMakePushCheckState.cmake:65 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "HAVE_CXX_ATOMICS_WITHOUT_LIB" will no longer be
dereferenced when the policy is set to NEW. Since the policy is not set
the OLD behavior will be used.
Call Stack (most recent call first):
CMakeLists.txt:123 (cmake_push_check_state)
CMakeLists.txt:139 (check_working_cxx_atomics)
This warning is for project developers. Use -Wno-dev to suppress it.
Uwe Hermann [Sat, 31 Mar 2018 22:05:11 +0000 (00:05 +0200)]
CMakeLists.txt: Set CMake policy CMP0071 to NEW.
This fixes bug #1143.
Soeren Apel [Sun, 4 Feb 2018 15:52:55 +0000 (16:52 +0100)]
DecodeSignal: Re-create SRD session when changes are pending
Gerhard Sittig [Tue, 2 Jan 2018 19:03:56 +0000 (20:03 +0100)]
DecodeSignal: Reset and re-use existing decoder sessions
Instead of destroying and re-creating decoder sessions, re-use
previously created sessions by just terminating their current work and
resetting internal state.
This implementation most proboably is incomplete in respect of changes
to the stack hierarchy or individual decoders' properties. This needs
more attention. When the stack is kept but its configuration has changed,
the involved properties need to get "somehow applied to" the stack's
instances before re-using it with new input data will yield correct results.
Uwe Hermann [Fri, 30 Mar 2018 20:27:29 +0000 (22:27 +0200)]
logging: Minor consistency fixes.
Uwe Hermann [Fri, 30 Mar 2018 20:24:43 +0000 (22:24 +0200)]
logging: Use different color for srd log messages.
The old brown color looked pretty reddish on some monitors (which
could be confused to mean "error"), select a slightly different color.
Soeren Apel [Fri, 30 Mar 2018 21:06:31 +0000 (23:06 +0200)]
Session: Set "segment complete" flags when no frames are used
Without this, A2L conversion is skipped for segment sizes smaller
than ConversionBlockSize, e.g. when acquiring only 100 samples.
Soeren Apel [Fri, 30 Mar 2018 21:03:28 +0000 (23:03 +0200)]
Really fix #1125 (and maybe #1139)
Uwe Hermann [Fri, 30 Mar 2018 18:20:46 +0000 (20:20 +0200)]
manpage: Mention -s | --log-to-stdout option.
Soeren Apel [Fri, 30 Mar 2018 17:08:58 +0000 (19:08 +0200)]
GlobalSettings: Announce settings changes to allow logging
Soeren Apel [Thu, 29 Mar 2018 19:12:01 +0000 (21:12 +0200)]
Settings: Change page list design
This may also fix #1095, we'll see.
Soeren Apel [Fri, 30 Mar 2018 15:56:28 +0000 (17:56 +0200)]
Main: Create human-readable stack trace and notify user
Soeren Apel [Fri, 30 Mar 2018 08:27:23 +0000 (10:27 +0200)]
Main: Add missing --no-scan long option for -D
Soeren Apel [Fri, 30 Mar 2018 08:26:34 +0000 (10:26 +0200)]
Main: Add -s option to allow logging to console as before
Soeren Apel [Fri, 30 Mar 2018 16:08:05 +0000 (18:08 +0200)]
SignalHandler: Rename include guard
Soeren Apel [Tue, 27 Mar 2018 13:19:04 +0000 (15:19 +0200)]
Add logging mechanism
Soeren Apel [Tue, 27 Mar 2018 14:25:17 +0000 (16:25 +0200)]
Add boost::stacktrace support
Uwe Hermann [Sun, 25 Mar 2018 21:15:25 +0000 (23:15 +0200)]
CMakeLists.txt: Fix a build issue on MSYS2.
Only apply an MXE-specific workaround on MXE (but not when building
natively using MSYS2), otherwise there are issues on MSYS2.
Uwe Hermann [Sun, 25 Mar 2018 19:02:48 +0000 (21:02 +0200)]
CMakeLists.txt: Only add Qt5PlatformSupport for Qt < 5.8.0.
Qt5PlatformSupport was removed in Qt 5.8.0.
Dan Horák [Fri, 23 Mar 2018 20:33:18 +0000 (21:33 +0100)]
fix catching polymorphic types by value
Compiling with GCC 8 produces a new warning about catching polymorphic
types by value. Proper way is to use references instead.
/home/sharkcz/projects/pulseview/main.cpp: In function ‘int main(int, char**)’:
/home/sharkcz/projects/pulseview/main.cpp:229:22: error: catching polymorphic type ‘class std::exception’ by value [-Werror=catch-value=]
} catch (exception e) {
^
cc1plus: all warnings being treated as errors
Soeren Apel [Sat, 17 Mar 2018 18:59:06 +0000 (19:59 +0100)]
Fix #1128 by showing firmware and PD search paths in settings dialog
Soeren Apel [Thu, 8 Mar 2018 23:31:51 +0000 (00:31 +0100)]
Apply changes suggested by clang-tidy
Soeren Apel [Thu, 8 Mar 2018 23:28:42 +0000 (00:28 +0100)]
Fix #1125 by adding a missing typecast
Without this typecast, the return type of get_sample_count() is
a uint64_t, which doesn't go well when it's 0 and we subtract 1
from it. Assigning the result of this underflow to an int64_t
doesn't help, it's too late.
Soeren Apel [Mon, 12 Mar 2018 14:58:06 +0000 (15:58 +0100)]
SignalBase: Speed up conversion and prevent leaving samples unconverted
Unconverted samples can happen due to a race condition: being notified
of new samples coming in is ignored when the thread is already executing.
If these notifications however were the last ones sent out because the
segment was completed right after, the currently ongoing conversion
will finish but not be restarted with the final sample range.
With this patch, this is prevented.
Soeren Apel [Tue, 6 Mar 2018 23:34:07 +0000 (00:34 +0100)]
Adjust signal to changes made in
7f894d958
This one slipped through and needs adjustment.
Soeren Apel [Tue, 6 Mar 2018 18:16:35 +0000 (19:16 +0100)]
MainBar: Style fixes
Wolfram Sang [Tue, 6 Mar 2018 13:48:54 +0000 (14:48 +0100)]
Fix #928 by catching errors if config_list() fails
MainBar::config_list() may fail so catch errors and don't segfault.
Discovered using an OLS with unknown firmware not supporting metadata.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Soeren Apel [Mon, 5 Mar 2018 22:45:46 +0000 (23:45 +0100)]
Fix #1132 by passing segment IDs, not segment instances
Passing segment instances fails because this creates a race condition.
When a long conversion is taking place, the SignalBase::samples_added
signal is called often but since it's in a separate thread, the calls
are queued and aren't executed immediately. Now if the conversion is
restarted - for example as a result of a changed conversion threshold -
then the segments holding the converted data are destroyed, rendering
the pointers submitted as parameters to samples_added invalid.
Once the signal queue is processed, those invalid pointers will be
accessed and PV segfaults.
Since the signal queue can neither be emptied nor flushed, this
leaves only two sensible choices:
1) Signal samples_added less often, thereby reducing the chance of
signals being queued
2) Supply the segment ID instead of the segment instance as that's
essentially the only thing we currently care about - in fact, the
only user of samples_added (ViewBase::on_samples_added) uses the
instance to query only this
As #1 is only a band-aid and not a waterproof solution, I chose
to go with #2.
Soeren Apel [Sat, 3 Mar 2018 23:25:07 +0000 (00:25 +0100)]
Session: Fix trigger handling
Soeren Apel [Fri, 23 Feb 2018 23:18:27 +0000 (00:18 +0100)]
GlobalSettings: Remove unneeded include/using
Soeren Apel [Fri, 23 Feb 2018 23:13:13 +0000 (00:13 +0100)]
Session: Add error messages
Soeren Apel [Wed, 21 Feb 2018 17:46:29 +0000 (18:46 +0100)]
Tiny whitespace fix
Soeren Apel [Sat, 10 Feb 2018 09:52:16 +0000 (10:52 +0100)]
Fix #1038 by catching invalid cursor ranges