pulseview.git
22 months agoDecodeSignal: avoid specifying a zero samplerate to libsigrokdecode
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.

22 months agosession: apply input format match to interactively loaded files, too
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.

22 months agosession: add support to auto detect input format (for init file)
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.

23 months agoInstaller: Add debug shortcut for -l 5
Soeren Apel [Mon, 7 May 2018 19:38:59 +0000 (21:38 +0200)]
Installer: Add debug shortcut for -l 5

23 months agoDecodeTrace: Use qreal instead of int for annotation drawing
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.

23 months agoDecodeTrace: Speed up painting by not copying the annotations
Soeren Apel [Thu, 19 Apr 2018 18:44:50 +0000 (20:44 +0200)]
DecodeTrace: Speed up painting by not copying the annotations

23 months agoFix #1149 by handling "d" and "(dd)" types separately
Soeren Apel [Sun, 6 May 2018 18:09:42 +0000 (20:09 +0200)]
Fix #1149 by handling "d" and "(dd)" types separately

23 months agoUpdate property widgets before showing device config popup
Soeren Apel [Sun, 6 May 2018 17:40:10 +0000 (19:40 +0200)]
Update property widgets before showing device config popup

23 months agoDecodeSignal: Prevent out-of-range exception
Soeren Apel [Fri, 4 May 2018 21:53:31 +0000 (23:53 +0200)]
DecodeSignal: Prevent out-of-range exception

23 months agoDecodeSignal: Re-set decoder metadata after stack termination
Soeren Apel [Fri, 4 May 2018 06:58:59 +0000 (08:58 +0200)]
DecodeSignal: Re-set decoder metadata after stack termination

23 months agoLogicSegment: Readability changes
Soeren Apel [Tue, 24 Apr 2018 07:27:15 +0000 (09:27 +0200)]
LogicSegment: Readability changes

23 months agoFix bar displaying undecoded area
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.

23 months agoDecodeTrace: Remove unused members
Soeren Apel [Sat, 21 Apr 2018 15:13:30 +0000 (17:13 +0200)]
DecodeTrace: Remove unused members

23 months agoDecodeSignal: When lacking input, retry only when data is available
Soeren Apel [Sat, 21 Apr 2018 09:09:11 +0000 (11:09 +0200)]
DecodeSignal: When lacking input, retry only when data is available

23 months agoFix #1174 by performing shutdown speed optimizations
Soeren Apel [Fri, 20 Apr 2018 22:14:36 +0000 (00:14 +0200)]
Fix #1174 by performing shutdown speed optimizations

23 months agoDon't use qDebug().noquote() for now (bug #1169)
Soeren Apel [Thu, 19 Apr 2018 21:41:14 +0000 (23:41 +0200)]
Don't use qDebug().noquote() for now (bug #1169)

23 months agoAnnotation: Use special type for the class, not plain int
Soeren Apel [Wed, 18 Apr 2018 06:49:49 +0000 (08:49 +0200)]
Annotation: Use special type for the class, not plain int

23 months agoFix #1162 by always submitting all changed options to libsrd
Soeren Apel [Tue, 17 Apr 2018 20:23:23 +0000 (22:23 +0200)]
Fix #1162 by always submitting all changed options to libsrd

23 months agoChannels popup: Use a more compact one-line button row.
Uwe Hermann [Sun, 15 Apr 2018 15:10:26 +0000 (17:10 +0200)]
Channels popup: Use a more compact one-line button row.

23 months agoinputfile: Increase chunk size from 16KB to 4MB.
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.

23 months agoinputfile: Use a vector instead of an array on the stack.
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.

23 months agoFix #709 by deriving row/ann colors from the channel color
Soeren Apel [Fri, 13 Apr 2018 17:00:13 +0000 (19:00 +0200)]
Fix #709 by deriving row/ann colors from the channel color

23 months agoTrace: Remove unneeded setters
Soeren Apel [Fri, 13 Apr 2018 07:27:38 +0000 (09:27 +0200)]
Trace: Remove unneeded setters

23 months agoChannels: Add missing include
Soeren Apel [Fri, 13 Apr 2018 07:13:07 +0000 (09:13 +0200)]
Channels: Add missing include

23 months agoSignalBase: Don't assume all channel settings are restorable
Soeren Apel [Wed, 11 Apr 2018 21:03:19 +0000 (23:03 +0200)]
SignalBase: Don't assume all channel settings are restorable

23 months agoRename colour* to color*
Soeren Apel [Tue, 10 Apr 2018 17:57:35 +0000 (19:57 +0200)]
Rename colour* to color*

23 months agoCentralize session error notification
Soeren Apel [Sat, 14 Apr 2018 17:35:20 +0000 (19:35 +0200)]
Centralize session error notification

23 months agoFix #1153 by only showing drivers we'll actually scan
Soeren Apel [Mon, 9 Apr 2018 16:50:28 +0000 (18:50 +0200)]
Fix #1153 by only showing drivers we'll actually scan

23 months agoChannels: Break up logic and analog channels into separate grids
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

23 months agoChannels: Let "Enable all changing" also check for sample data
Soeren Apel [Sun, 8 Apr 2018 21:03:33 +0000 (23:03 +0200)]
Channels: Let "Enable all changing" also check for sample data

23 months agoChannels: Don't use flat buttons and add vertical spacer
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.

23 months agoChannels: Re-arrange selector buttons
Soeren Apel [Sun, 8 Apr 2018 20:00:06 +0000 (22:00 +0200)]
Channels: Re-arrange selector buttons

2 years agoSession: Don't process packets without sample data
Soeren Apel [Sun, 8 Apr 2018 18:41:48 +0000 (20:41 +0200)]
Session: Don't process packets without sample data

2 years agoFix #1023 by implementing filtering channel selectors
Soeren Apel [Thu, 5 Apr 2018 20:23:28 +0000 (22:23 +0200)]
Fix #1023 by implementing filtering channel selectors

2 years agoDecodeSignal: Use srd_session_terminate_reset() for multi-segment data
Soeren Apel [Thu, 5 Apr 2018 17:03:20 +0000 (19:03 +0200)]
DecodeSignal: Use srd_session_terminate_reset() for multi-segment data

2 years agoApply option changes immediately, not on decode stack rebuild
Soeren Apel [Thu, 5 Apr 2018 07:07:36 +0000 (09:07 +0200)]
Apply option changes immediately, not on decode stack rebuild

2 years agoAdd DecodeSignal and Session error logging
Soeren Apel [Wed, 4 Apr 2018 17:07:27 +0000 (19:07 +0200)]
Add DecodeSignal and Session error logging

2 years agoLogging: Make logging thread-safe
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.

2 years agoview.cpp: Drop unneeded parenthesis.
Uwe Hermann [Sun, 1 Apr 2018 17:52:36 +0000 (19:52 +0200)]
view.cpp: Drop unneeded parenthesis.

2 years agoFix build with -DENABLE_DECODE=n.
Uwe Hermann [Sun, 1 Apr 2018 17:52:18 +0000 (19:52 +0200)]
Fix build with -DENABLE_DECODE=n.

2 years agoFix two clang-tidy warnings.
Uwe Hermann [Sun, 1 Apr 2018 17:28:43 +0000 (19:28 +0200)]
Fix two clang-tidy warnings.

2 years agoCMakeLists.txt: Set CMake policy CMP0054 to NEW.
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.

2 years agoCMakeLists.txt: Set CMake policy CMP0071 to NEW.
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.

2 years agoDecodeSignal: Re-create SRD session when changes are pending
Soeren Apel [Sun, 4 Feb 2018 15:52:55 +0000 (16:52 +0100)]
DecodeSignal: Re-create SRD session when changes are pending

2 years agoDecodeSignal: Reset and re-use existing decoder sessions
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.

2 years agologging: Minor consistency fixes.
Uwe Hermann [Fri, 30 Mar 2018 20:27:29 +0000 (22:27 +0200)]
logging: Minor consistency fixes.

2 years agologging: Use different color for srd log messages.
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.

2 years agoSession: Set "segment complete" flags when no frames are used
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.

2 years agoReally fix #1125 (and maybe #1139)
Soeren Apel [Fri, 30 Mar 2018 21:03:28 +0000 (23:03 +0200)]
Really fix #1125 (and maybe #1139)

2 years agomanpage: Mention -s | --log-to-stdout option.
Uwe Hermann [Fri, 30 Mar 2018 18:20:46 +0000 (20:20 +0200)]
manpage: Mention -s | --log-to-stdout option.

2 years agoGlobalSettings: Announce settings changes to allow logging
Soeren Apel [Fri, 30 Mar 2018 17:08:58 +0000 (19:08 +0200)]
GlobalSettings: Announce settings changes to allow logging

2 years agoSettings: Change page list design
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.

2 years agoMain: Create human-readable stack trace and notify user
Soeren Apel [Fri, 30 Mar 2018 15:56:28 +0000 (17:56 +0200)]
Main: Create human-readable stack trace and notify user

2 years agoMain: Add missing --no-scan long option for -D
Soeren Apel [Fri, 30 Mar 2018 08:27:23 +0000 (10:27 +0200)]
Main: Add missing --no-scan long option for -D

2 years agoMain: Add -s option to allow logging to console as before
Soeren Apel [Fri, 30 Mar 2018 08:26:34 +0000 (10:26 +0200)]
Main: Add -s option to allow logging to console as before

2 years agoSignalHandler: Rename include guard
Soeren Apel [Fri, 30 Mar 2018 16:08:05 +0000 (18:08 +0200)]
SignalHandler: Rename include guard

2 years agoAdd logging mechanism
Soeren Apel [Tue, 27 Mar 2018 13:19:04 +0000 (15:19 +0200)]
Add logging mechanism

2 years agoAdd boost::stacktrace support
Soeren Apel [Tue, 27 Mar 2018 14:25:17 +0000 (16:25 +0200)]
Add boost::stacktrace support

2 years agoCMakeLists.txt: Fix a build issue on MSYS2.
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.

2 years agoCMakeLists.txt: Only add Qt5PlatformSupport for Qt < 5.8.0.
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.

2 years agofix catching polymorphic types by value
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

2 years agoFix #1128 by showing firmware and PD search paths in settings dialog
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

2 years agoApply changes suggested by clang-tidy
Soeren Apel [Thu, 8 Mar 2018 23:31:51 +0000 (00:31 +0100)]
Apply changes suggested by clang-tidy

2 years agoFix #1125 by adding a missing typecast
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.

2 years agoSignalBase: Speed up conversion and prevent leaving samples unconverted
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.

2 years agoAdjust signal to changes made in 7f894d958
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.

2 years agoMainBar: Style fixes
Soeren Apel [Tue, 6 Mar 2018 18:16:35 +0000 (19:16 +0100)]
MainBar: Style fixes

2 years agoFix #928 by catching errors if config_list() fails
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>
2 years agoFix #1132 by passing segment IDs, not segment instances
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.

2 years agoSession: Fix trigger handling
Soeren Apel [Sat, 3 Mar 2018 23:25:07 +0000 (00:25 +0100)]
Session: Fix trigger handling

2 years agoGlobalSettings: Remove unneeded include/using
Soeren Apel [Fri, 23 Feb 2018 23:18:27 +0000 (00:18 +0100)]
GlobalSettings: Remove unneeded include/using

2 years agoSession: Add error messages
Soeren Apel [Fri, 23 Feb 2018 23:13:13 +0000 (00:13 +0100)]
Session: Add error messages

2 years agoTiny whitespace fix
Soeren Apel [Wed, 21 Feb 2018 17:46:29 +0000 (18:46 +0100)]
Tiny whitespace fix

2 years agoFix #1038 by catching invalid cursor ranges
Soeren Apel [Sat, 10 Feb 2018 09:52:16 +0000 (10:52 +0100)]
Fix #1038 by catching invalid cursor ranges

2 years agoMinGW: Fix a compile error due to a missing #include.
Uwe Hermann [Sat, 10 Feb 2018 21:01:26 +0000 (22:01 +0100)]
MinGW: Fix a compile error due to a missing #include.

  In file included from [...]/pv/globalsettings.cpp:20:0:
  [...]/pv/globalsettings.hpp:31:12: error: 'std::function' has not been declared
   using std::function;
              ^
  test/CMakeFiles/pulseview-test.dir/build.make:88: recipe for target 'test/CMakeFiles/pulseview-test.dir/__/pv/globalsettings.cpp.obj' failed
  make[2]: *** [test/CMakeFiles/pulseview-test.dir/__/pv/globalsettings.cpp.obj] Error 1
  make[2]: *** Waiting for unfinished jobs....
  [  5%] Building CXX object CMakeFiles/pulseview.dir/pv/globalsettings.cpp.obj
  In file included from [...]/pv/globalsettings.cpp:20:0:
  [...]/pv/globalsettings.hpp:31:12: error: 'std::function' has not been declared
   using std::function;
              ^

Add #include <functional> everywhere where std::function is used. Only
the occurence in globalsettings.hpp was causing an actual build failure
on MinGW, though.

2 years agofix PulseView compilation with ENABLE_DECODE set to OFF
Martin Errenst [Sat, 3 Feb 2018 23:57:07 +0000 (00:57 +0100)]
fix PulseView compilation with ENABLE_DECODE set to OFF

2 years agoMainBar: fixup file extension filter in "Import File" dialog
Gerhard Sittig [Sun, 4 Feb 2018 13:54:32 +0000 (14:54 +0100)]
MainBar: fixup file extension filter in "Import File" dialog

The previous implementation used a "*" filter when a file of any other
format than srzip got imported. This happened to be a duplicate of
"All files", and ignored the list of filename extensions provided by
the input formats.

This change does respect the input format's file extensions, and copes
with the lack of such a list (raw binary), as well as lists that have
one (most formats), or multiple extensions (raw analog).

This fixes bug #1039.

Another byproduct of the change is that extensions and their decoration
(separators, parentheses) move outside of tr() calls. These technical
details shall not concern translators, and translations for human
languages shall not break the filter mechanism.

This implementation might be "too complex, computationally expensive".
But it works, and fixes an issue, and the code path executes seldom and
waits for user interaction anyway. Cost reduction can get applied later.

2 years agoFix #1089 by updating the signal labels and group labels
Soeren Apel [Thu, 8 Feb 2018 15:32:19 +0000 (16:32 +0100)]
Fix #1089 by updating the signal labels and group labels

Group names currently don't change, so this doesn't do much
but they may change in the future, so it's useful to do anyway.

2 years agoRuler tick legends don't partly disappear when scrolled off the ends
Cenkron [Mon, 15 Jan 2018 02:04:17 +0000 (20:04 -0600)]
Ruler tick legends don't partly disappear when scrolled off the ends

2 years agoRework the callback mechanism for the global settings
Soeren Apel [Sun, 21 Jan 2018 13:28:27 +0000 (14:28 +0100)]
Rework the callback mechanism for the global settings

Up to now, registered callbacks could not be unregistered
because std::function does not permit comparing for equality.

Using an interface class removes the need for std::function,
making the mechanism a little less elegant but at least fully
functional.

2 years agoView: Fully integrate the "zero trigger time" setting
Soeren Apel [Fri, 19 Jan 2018 20:46:21 +0000 (21:46 +0100)]
View: Fully integrate the "zero trigger time" setting

2 years agoSession/View: Save triggers in a list and use it
Soeren Apel [Wed, 7 Feb 2018 09:51:30 +0000 (10:51 +0100)]
Session/View: Save triggers in a list and use it

2 years agoSession: Clean up header a little
Soeren Apel [Wed, 24 Jan 2018 08:35:23 +0000 (09:35 +0100)]
Session: Clean up header a little

2 years agoAdjust unit tests
Soeren Apel [Tue, 6 Feb 2018 18:28:37 +0000 (19:28 +0100)]
Adjust unit tests

2 years agoChange the number of minor ticks to be either 4 or 5
Cenkron [Wed, 10 Jan 2018 15:10:58 +0000 (09:10 -0600)]
Change the number of minor ticks to be either 4 or 5

Depends on the current tick interval size, in the sense of the 1, 2, 5
sequence. It was originally always 4.

2 years agoProvide a settings checkbox for showing zero at the trigger
Cenkron [Wed, 10 Jan 2018 02:28:11 +0000 (20:28 -0600)]
Provide a settings checkbox for showing zero at the trigger

2 years agoDecodeSignal: only pass non-zero sample rate to decoders
Gerhard Sittig [Sun, 28 Jan 2018 20:02:54 +0000 (21:02 +0100)]
DecodeSignal: only pass non-zero sample rate to decoders

As reported in bug #1118 not all input sources provide a samplerate, and
decoder instances may not cope with a rate spec of 0. Only pass non-zero
sample rates to the decoder stack. This improves robustness in addition
to the specific fix for #1118 in the decoders' implementations.

2 years agodoc: Update pulseview(1) manpage, add --no-scan option (-D)
Gerhard Sittig [Wed, 24 Jan 2018 20:22:43 +0000 (21:22 +0100)]
doc: Update pulseview(1) manpage, add --no-scan option (-D)

2 years agomain: introduce -D cmdline option, don't auto-scan for devices
Gerhard Sittig [Wed, 24 Jan 2018 20:11:50 +0000 (21:11 +0100)]
main: introduce -D cmdline option, don't auto-scan for devices

Add a -D command line option which skips auto-detection of devices upon
startup. This can speedup program startup for setups with known devices,
and allows to skip the scan for troubled drivers which might break the
startup phase.

This -D option can be combined with -d specs, either presence or absence
of -d is acceptable when -D is specified. Users still can interactively
scan for and use devices after program startup.

This resolves bug #1116.

2 years agowin32: Use -mwindows only for non-Debug targets.
Cenkron [Fri, 12 Jan 2018 18:43:27 +0000 (12:43 -0600)]
win32: Use -mwindows only for non-Debug targets.

Direct cmake to apply the -mwindows linker switch based on a cmake
command line argument rather than by using a patch file. The command
line argument is -DCMAKE_BUILD_TYPE=xxxxx and applies the linker switch
only to WIN32 builds that are not Debug.

2 years agoDecodeSignal: Void a session pointer after destroy() call
Gerhard Sittig [Tue, 2 Jan 2018 18:51:22 +0000 (19:51 +0100)]
DecodeSignal: Void a session pointer after destroy() call

Fixup an error path when starting a created decoder session fails.

2 years agomain.cpp: check log level range before using its value
Gerhard Sittig [Tue, 2 Jan 2018 21:13:06 +0000 (22:13 +0100)]
main.cpp: check log level range before using its value

(Silently) ignore invalid -l loglevel specs. This avoids a crash
reported in bug #1071.

2 years agoFix unit tests
Soeren Apel [Sun, 7 Jan 2018 20:48:54 +0000 (21:48 +0100)]
Fix unit tests

2 years agoAdd segment display mode UI controls and some related changes
Soeren Apel [Sun, 7 Jan 2018 20:09:55 +0000 (21:09 +0100)]
Add segment display mode UI controls and some related changes

2 years agoAdd segment display mode icons
Soeren Apel [Sun, 7 Jan 2018 20:00:47 +0000 (21:00 +0100)]
Add segment display mode icons

2 years agoSession: Make get_segment_count() consider all segments
Soeren Apel [Sun, 7 Jan 2018 19:15:19 +0000 (20:15 +0100)]
Session: Make get_segment_count() consider all segments

Also changes the type for the getters to uint32_t.

2 years agoSupply the segment ID when adding samples to optimize trace painting
Soeren Apel [Fri, 5 Jan 2018 19:48:20 +0000 (20:48 +0100)]
Supply the segment ID when adding samples to optimize trace painting

Use case is as follows:
- Capture 20+ segments with ~500kS each
- Afterwards, enable conversion for a channel

Without this change, the converted logic will be repainted
20++ times because we are only told that new samples were
added but not which segment.

With this change, the logic trace is only painted when we
see that samples were added to the segment we're showing.

2 years agoAdd segment_id to all segment classes
Soeren Apel [Fri, 5 Jan 2018 14:24:41 +0000 (15:24 +0100)]
Add segment_id to all segment classes

2 years agoLogicSegment: Don't use new/delete in get_unpacked_sample()
Soeren Apel [Wed, 3 Jan 2018 23:30:28 +0000 (00:30 +0100)]
LogicSegment: Don't use new/delete in get_unpacked_sample()

2 years agoLogicSegment: Limit end in get_subsampled_edges() if needed
Soeren Apel [Wed, 3 Jan 2018 16:14:51 +0000 (17:14 +0100)]
LogicSegment: Limit end in get_subsampled_edges() if needed

This is necessary because there is a race condition between
adding samples and trace repainting.