]> sigrok.org Git - pulseview.git/log
pulseview.git
7 years agoDecodeSignal: Break up annotation storage to allow multiple segments
Soeren Apel [Sat, 9 Sep 2017 06:42:36 +0000 (08:42 +0200)]
DecodeSignal: Break up annotation storage to allow multiple segments

7 years agoImplement showing only the selected segment
Soeren Apel [Thu, 31 Aug 2017 06:24:53 +0000 (08:24 +0200)]
Implement showing only the selected segment

7 years agoAdd segment selector UI + helpers
Soeren Apel [Sun, 10 Sep 2017 19:26:59 +0000 (21:26 +0200)]
Add segment selector UI + helpers

7 years agorowdata: Use emplace_back() for Annotation objects.
Uwe Hermann [Wed, 2 Aug 2017 06:14:31 +0000 (08:14 +0200)]
rowdata: Use emplace_back() for Annotation objects.

This should eliminate one unnecessary allocation per annotation.

7 years agoRename DecodeSignal::segment_ to logic_mux_segment_ for clarity
Soeren Apel [Fri, 1 Sep 2017 06:21:10 +0000 (08:21 +0200)]
Rename DecodeSignal::segment_ to logic_mux_segment_ for clarity

7 years agoFix #1024 by changing decode channel assigment to PDs
Soeren Apel [Fri, 8 Sep 2017 16:14:47 +0000 (18:14 +0200)]
Fix #1024 by changing decode channel assigment to PDs

When assigning the decoder stack channels to the libsrd
instance's channels, channels that had no signal assigned
to them were still assigned anyway. This patch fixes this bug.

After doing this, another subtle bug became apparent:
The mapping between channels and bits in the data stream sent
to the PD was done via DecodeChannel->id. This is however
insufficient as the channels of the decoder stack have
IDs that may or may not match the ID needed for the data
stream. Example:

A PD has 4 channels: A, B, C and D. In PV, those channels
have the IDs 0, 1, 2 and 3. If the user only assigns A and D,
Decoder::create_decoder_inst() will use the IDs 0 and 3 as
the bit positions of those signals in the data stream sent
to libsrd. This is obviously wrong.

Hence, we now use a separate bit_id for this purpose.

7 years agoAnalogSignal: Prevent threshold bg from spilling beyond extents
Soeren Apel [Mon, 21 Aug 2017 17:58:49 +0000 (19:58 +0200)]
AnalogSignal: Prevent threshold bg from spilling beyond extents

7 years agoImplement "show conversion thresholds as dots" mode
Soeren Apel [Sat, 19 Aug 2017 21:58:36 +0000 (23:58 +0200)]
Implement "show conversion thresholds as dots" mode

7 years agoConvert threshold display setting to a multi-value choice
Soeren Apel [Sun, 20 Aug 2017 14:18:50 +0000 (16:18 +0200)]
Convert threshold display setting to a multi-value choice

7 years agoAnalogSignal: Make threshold neutral area darker
Soeren Apel [Thu, 17 Aug 2017 06:30:29 +0000 (08:30 +0200)]
AnalogSignal: Make threshold neutral area darker

7 years agoSession: Rework frame handling
Soeren Apel [Mon, 14 Aug 2017 15:52:43 +0000 (17:52 +0200)]
Session: Rework frame handling

7 years agoAnalogSignal: Use setting change handler for threshold display
Soeren Apel [Tue, 8 Aug 2017 17:40:11 +0000 (19:40 +0200)]
AnalogSignal: Use setting change handler for threshold display

7 years agoAnalogSignal: Draw analog thresholds differently
Soeren Apel [Mon, 7 Aug 2017 19:41:11 +0000 (21:41 +0200)]
AnalogSignal: Draw analog thresholds differently

Instead of using a patterned region on top of the trace,
show the thresholds by using different background colors
for the individual areas: green/grey/red.

7 years agoView: Update ruler after restoring session
Soeren Apel [Sat, 5 Aug 2017 20:38:45 +0000 (22:38 +0200)]
View: Update ruler after restoring session

If we don't do this, the ruler is out-of-sync with the rest
of the view until the session is loaded and goes into stopped
state. At that point, the ruler is updated, which is too late.

7 years agoSignalBase: Default to dynamic conversion preset, not custom values
Soeren Apel [Wed, 2 Aug 2017 16:42:34 +0000 (18:42 +0200)]
SignalBase: Default to dynamic conversion preset, not custom values

The reason for this change is that when you initially select a
conversion from the channel config popup dialog, the threshold
will be set to "0.0V" or "0.0V/0.0V", respectively.
This is of course not what we want and the root cause is that
when no preset is selected, NoPreset is assumed instead of
DynamicPreset. This patch changes this.

7 years agoUse min/max notification for autoranging of analog signals
Soeren Apel [Wed, 2 Aug 2017 16:23:32 +0000 (18:23 +0200)]
Use min/max notification for autoranging of analog signals

7 years agoMove delayed conversion starter to SignalBase
Soeren Apel [Wed, 2 Aug 2017 07:15:18 +0000 (09:15 +0200)]
Move delayed conversion starter to SignalBase

This way, we can use the same mechanism for changing
min/max as well, preventing multiple successive starts
of the conversion algorithm.
Preventing this is necessary because it makes the UI
stop updating for a significant amount of time, which
we obviously don't want.

7 years agoRemove SignalBase::A2LChannel
Soeren Apel [Tue, 1 Aug 2017 19:38:15 +0000 (21:38 +0200)]
Remove SignalBase::A2LChannel

7 years agoUse identifiers for fixed conversion preset values
Soeren Apel [Tue, 1 Aug 2017 19:35:15 +0000 (21:35 +0200)]
Use identifiers for fixed conversion preset values

7 years agoRestart min-max-based conversion if min or max change
Soeren Apel [Tue, 1 Aug 2017 18:58:46 +0000 (20:58 +0200)]
Restart min-max-based conversion if min or max change

7 years agoFix some random clang-tidy warnings.
Uwe Hermann [Tue, 1 Aug 2017 20:19:56 +0000 (22:19 +0200)]
Fix some random clang-tidy warnings.

7 years agoTrace view: Make the zero line for analog traces thicker
Soeren Apel [Mon, 31 Jul 2017 22:09:06 +0000 (00:09 +0200)]
Trace view: Make the zero line for analog traces thicker

This is to make it stand out more and make it easily
distinguishable.

7 years agoImplement graphical display of A2L thresholds
Soeren Apel [Mon, 31 Jul 2017 20:31:54 +0000 (22:31 +0200)]
Implement graphical display of A2L thresholds

7 years agoTypo fix: treshold -> threshold
Soeren Apel [Sat, 29 Jul 2017 17:44:59 +0000 (19:44 +0200)]
Typo fix: treshold -> threshold

7 years agoAnalogSignal: Reword "traces to show" option
Soeren Apel [Sat, 29 Jul 2017 17:41:31 +0000 (19:41 +0200)]
AnalogSignal: Reword "traces to show" option

7 years agoAnalogSignal: Use pv::data::SignalBase namespace
Soeren Apel [Sat, 29 Jul 2017 17:33:47 +0000 (19:33 +0200)]
AnalogSignal: Use pv::data::SignalBase namespace

7 years agoImplement A2L presets and custom threshold handling
Soeren Apel [Mon, 31 Jul 2017 20:31:20 +0000 (22:31 +0200)]
Implement A2L presets and custom threshold handling

7 years agoUse getter for the conversion type instead of a local copy
Soeren Apel [Tue, 25 Jul 2017 14:09:08 +0000 (16:09 +0200)]
Use getter for the conversion type instead of a local copy

Don't ask me why I used a local copy in the first place,
even I can't figure it out :)

7 years agoSignalBase: Minor doxygen comments
Soeren Apel [Mon, 24 Jul 2017 06:57:51 +0000 (08:57 +0200)]
SignalBase: Minor doxygen comments

7 years agoTrace View: Add doxygen comments to some classes
Soeren Apel [Sun, 23 Jul 2017 20:17:16 +0000 (22:17 +0200)]
Trace View: Add doxygen comments to some classes

7 years agoImprove hover point signaling
Soeren Apel [Sun, 23 Jul 2017 07:35:25 +0000 (09:35 +0200)]
Improve hover point signaling

Two issues here:
1) it's bad style to have an event handler for an event
that was triggered in the same class
2) supplying the current hover point along with the event
is a sensible thing to do

7 years agoRemove signal scale handle
Soeren Apel [Thu, 20 Jul 2017 06:45:06 +0000 (08:45 +0200)]
Remove signal scale handle

It will be replaced by a different mechanism.

7 years agoTriggerMarker: Don't return "valid" drag point coordinates
Soeren Apel [Tue, 18 Jul 2017 18:40:33 +0000 (20:40 +0200)]
TriggerMarker: Don't return "valid" drag point coordinates

7 years agoRename ViewItem::point() to ViewItem::drag_point() for clarity
Soeren Apel [Tue, 18 Jul 2017 15:51:01 +0000 (17:51 +0200)]
Rename ViewItem::point() to ViewItem::drag_point() for clarity

7 years agoINSTALL/CMakeLists.txt: Bump libsigrokdecode requirement to >= 0.6.0.
Uwe Hermann [Fri, 21 Jul 2017 05:08:06 +0000 (07:08 +0200)]
INSTALL/CMakeLists.txt: Bump libsigrokdecode requirement to >= 0.6.0.

PulseView now relies on e.g. the fact that multiple libsigrokdecode
calls from different threads don't cause issues (which has not been the
case prior to libsigrokdecode 0.6.0).

7 years agoCMakeLists.txt: Bump libsigrokcxx requirement to 0.6.0.
Uwe Hermann [Fri, 21 Jul 2017 05:07:10 +0000 (07:07 +0200)]
CMakeLists.txt: Bump libsigrokcxx requirement to 0.6.0.

This was already documented in INSTALL, but the check wasn't updated.

7 years agoFix the build with ENABLE_DECODE=n.
Uwe Hermann [Wed, 19 Jul 2017 18:55:59 +0000 (20:55 +0200)]
Fix the build with ENABLE_DECODE=n.

  pv/dialogs/settings.cpp: In member function ‘QWidget* pv::dialogs::Settings::get_decoder_settings_form(QWidget*) const’:
  pv/dialogs/settings.cpp:218:1: error: no return statement in function returning non-void [-Werror=return-type]

7 years agoLogicSignal: Make trace height adjustable
Soeren Apel [Sun, 16 Jul 2017 20:09:19 +0000 (22:09 +0200)]
LogicSignal: Make trace height adjustable

7 years agoIntroduce "logic trace height" setting
Soeren Apel [Sun, 16 Jul 2017 19:29:26 +0000 (21:29 +0200)]
Introduce "logic trace height" setting

7 years agoAnalogSignal: Make div height adjustable
Soeren Apel [Sun, 16 Jul 2017 20:10:16 +0000 (22:10 +0200)]
AnalogSignal: Make div height adjustable

7 years agoIntroduce "default div height" setting
Soeren Apel [Sun, 16 Jul 2017 17:14:16 +0000 (19:14 +0200)]
Introduce "default div height" setting

7 years agoDecodeTrace: Resize trace when hiding/deleting a stacked PD
Soeren Apel [Fri, 14 Jul 2017 16:24:32 +0000 (18:24 +0200)]
DecodeTrace: Resize trace when hiding/deleting a stacked PD

The trace height depends on DecodeTrace::max_visible_rows_,
which needs to be updated when a stacked PD is hidden or
deleted. In order to do this, we reset max_visible_rows_ to
0 and then request a repaint.

7 years agoDecodeTrace: Fix trace resizing when new annotation classes appear
Soeren Apel [Fri, 14 Jul 2017 06:46:21 +0000 (08:46 +0200)]
DecodeTrace: Fix trace resizing when new annotation classes appear

7 years agoMake restack_items() available to all TraceTreeItemOwners
Soeren Apel [Fri, 14 Jul 2017 06:40:04 +0000 (08:40 +0200)]
Make restack_items() available to all TraceTreeItemOwners

Currently, TTIO:restack_items() is empty and only the
TraceGroup actually implements it. For this reason, decode
traces (and analog traces) are correctly pushing other traces
around when their size changes.
Top-level traces that are not part of a group however aren't
handled properly, simply overlapping when they grow.

This patch makes the code available to all TTIO-derived
classes, allowing all owners (including View itself) to
properly handle this event.

7 years agoDecodeTrace: Don't show tooltips destined for the header area
Soeren Apel [Wed, 12 Jul 2017 07:05:39 +0000 (09:05 +0200)]
DecodeTrace: Don't show tooltips destined for the header area

7 years agoDecodeSignal: Don't set name when creating the signal
Soeren Apel [Mon, 10 Jul 2017 17:14:35 +0000 (19:14 +0200)]
DecodeSignal: Don't set name when creating the signal

The thought behind this was to have no unnamed signals because
this may make debugging harder. However, giving the signal a
long name and shortening it when decoders are added isn't working
well. The reason is that the width of the header area can be
expanded programmatically but we don't shrink it because we
don't want to hide things the user may want to see.
This behavior in turn leads to the header width expanding when
a signal labeled "Empty decoder signal" is added, only to see
this very signal be renamed to e.g. "SPI" immediately afterwards.
As we don't shrink the header width, the header is now too wide.

7 years agoDecodeSignal: Fix flawed PD stack restoration
Soeren Apel [Thu, 6 Jul 2017 20:27:46 +0000 (22:27 +0200)]
DecodeSignal: Fix flawed PD stack restoration

Before, the libsigrokdecode sessions would be started without
having any channels assigned to it, which of course should be
avoided.

7 years agoFix assertions
Soeren Apel [Thu, 6 Jul 2017 19:55:01 +0000 (21:55 +0200)]
Fix assertions

7 years agoFix unit tests
Soeren Apel [Thu, 6 Jul 2017 19:19:04 +0000 (21:19 +0200)]
Fix unit tests

7 years agoApply some clang-tidy fixes.
Uwe Hermann [Thu, 6 Jul 2017 06:56:39 +0000 (08:56 +0200)]
Apply some clang-tidy fixes.

This patch was generated using clang-tidy:

  clang-tidy -checks="-*,..." -fix

The following set of checks was enabled:

  modernize-use-nullptr,modernize-deprecated-headers,modernize-make-shared,
  modernize-redundant-void-arg,modernize-use-bool-literals,
  modernize-use-emplace,modernize-use-equals-default,
  google-readability-namespace-comments,misc-unused-using-decls

Add NOLINT to have clang-tidy (among other tools) ignore some lines
that are not meant to be changed.

7 years agoDecodeSignal: Auto-assign only the channels of newly added decoders
Soeren Apel [Wed, 5 Jul 2017 16:16:18 +0000 (18:16 +0200)]
DecodeSignal: Auto-assign only the channels of newly added decoders

Before, the channels of all decoders in the stack were auto-assigned,
potentially messing up the configuration the user chose.

7 years agoSignalBase: Adjust Schmitt-trigger thresholds
Soeren Apel [Thu, 29 Jun 2017 17:16:18 +0000 (19:16 +0200)]
SignalBase: Adjust Schmitt-trigger thresholds

Currently, the thresholds are determined by the minimum
and maximum values of a signal. From those, we derive the
high and low thresholds by using a 10% margin to min/max.

However, this approach doesn't work very well when the
measurement includes reset conditions or similar, causing
spikes that raise the min/max significantly.

Example:
sigrok-dumps/i2c/eeprom_24xx/microchip_24lc64/sainsmart_dds120_powerup_scl_sda_analog.sr

This patch changes the thresholds margins to 35%. However,
they are expressed differently: (max-min)/2 is used as the
center line, from which 15% of the amplitude (max-min) is
used as the margin. This way seems a little more intuitive
for me since the percentage given (15) is directly proportional
to the hysteresis.

7 years agoDecodeSignal: Improve robustness
Soeren Apel [Sat, 1 Jul 2017 21:37:55 +0000 (23:37 +0200)]
DecodeSignal: Improve robustness

7 years agoMake sigrok::Context semi-global and use libsigrok A2L methods
Soeren Apel [Sat, 1 Jul 2017 22:48:31 +0000 (00:48 +0200)]
Make sigrok::Context semi-global and use libsigrok A2L methods

7 years agoMake get_raw_samples() use provided mem instead of allocating
Soeren Apel [Sat, 1 Jul 2017 20:24:06 +0000 (22:24 +0200)]
Make get_raw_samples() use provided mem instead of allocating

Until now, Segment::get_raw_samples() was allocating the required
amount of memory and returned it to the caller to use. This way,
there was always enough memory allocated for the data that was
written to that memory location.

However, in SignalBase::conversion_thread_proc() we want to use
one memory location multiple times because we will create several
layers of libsigrok wrapper objects around it. This only works
if Segment::get_raw_samples() uses a given memory location instead
of allocating it by itself.

7 years agoDecodeSignal: Remove global SRD mutex
Soeren Apel [Sat, 1 Jul 2017 21:48:13 +0000 (23:48 +0200)]
DecodeSignal: Remove global SRD mutex

libsigrokdecode commit 514b2edc54efda9c6698456748c4256bb901eddd
makes it thread-safe, so PV can now access it whenever it wants,
not needing to care about concurrent access.

7 years agoFix #831 by saving/restoring PD options
Soeren Apel [Mon, 26 Jun 2017 20:49:28 +0000 (22:49 +0200)]
Fix #831 by saving/restoring PD options

7 years agoFix #888 by incrementing i only once per iteration
Soeren Apel [Fri, 23 Jun 2017 20:14:44 +0000 (22:14 +0200)]
Fix #888 by incrementing i only once per iteration

7 years agoFix #831 by saving/restoring the PD channel mapping
Soeren Apel [Tue, 27 Jun 2017 06:34:29 +0000 (08:34 +0200)]
Fix #831 by saving/restoring the PD channel mapping

7 years agoFix #832 by saving/restoring the decoder stack without settings
Soeren Apel [Tue, 27 Jun 2017 06:33:08 +0000 (08:33 +0200)]
Fix #832 by saving/restoring the decoder stack without settings

7 years agoSession: Break up add_decoder()
Soeren Apel [Tue, 20 Jun 2017 20:38:51 +0000 (22:38 +0200)]
Session: Break up add_decoder()

7 years agoRename "always zoom-to-fit" to "zoom-to-fit during acquisition"
Soeren Apel [Mon, 19 Jun 2017 19:31:23 +0000 (21:31 +0200)]
Rename "always zoom-to-fit" to "zoom-to-fit during acquisition"

7 years agoFix #236 by introducing "zoom-to-fit when acquisition stops" option
Soeren Apel [Wed, 5 Jul 2017 20:28:12 +0000 (22:28 +0200)]
Fix #236 by introducing "zoom-to-fit when acquisition stops" option

7 years agoGlobalSettings: Enable "show sampling points" by default
Soeren Apel [Sun, 18 Jun 2017 18:50:56 +0000 (20:50 +0200)]
GlobalSettings: Enable "show sampling points" by default

7 years agoDecode: Improve signaling
Soeren Apel [Tue, 27 Jun 2017 16:32:30 +0000 (18:32 +0200)]
Decode: Improve signaling

Three issues that were fixed by this:
1) The SignalBase did notify PDs when its conversion changed
and new sample data was generated but this was dismissed as
the samples_cleared() signal was never fired nor used by the
PD stack.

2) The decode_finished() signal was added so that the decode
trace can immediately paint the trace once the PD is done.
Before, a repaint was only triggered when annotations came in,
resulting in a noticeable "unresolved period" visible if the
last stretch of signal didn't contain any annotations as the
trace wasn't repainted quickly enough.

3) The decode trace indirectly looks at the signal's
samples_decoded_ member when drawing the "unresolved period"
bar. Hence we should update this member before triggering the
repaint via new_annotations().

7 years agoFix #981 by adding non-device signals upon view creation
Soeren Apel [Wed, 14 Jun 2017 19:53:58 +0000 (21:53 +0200)]
Fix #981 by adding non-device signals upon view creation

7 years agoDecodeSignal: Don't assume channels always have logic data
Soeren Apel [Wed, 14 Jun 2017 21:37:18 +0000 (23:37 +0200)]
DecodeSignal: Don't assume channels always have logic data

It could be that a signal was assigned to a decoder when it
had a conversion enabled, then the conversion was removed.
This means the signal may no longer provide logic data but
as it's still assigned to the decoder, it will try to access
the logic data and... boom.

7 years agoDecodeSignal: Provide conversion data container sooner
Soeren Apel [Tue, 23 May 2017 16:41:20 +0000 (18:41 +0200)]
DecodeSignal: Provide conversion data container sooner

Before, the converted_data_ container was only created
once we had sample data coming in. This meant that it
wasn't possible to assign a converted signal to a decoder.

With this change, the data container is created even
when there is no data to fill it with, allowing logic_data()
to return a valid result and in turn allowing the user
to assign the signal to a decoder.

7 years agoDecodeSignal: Adjust the DecodeChunkLength
Soeren Apel [Sun, 21 May 2017 22:24:10 +0000 (00:24 +0200)]
DecodeSignal: Adjust the DecodeChunkLength

The initial 4096 was too low, though it did make the UI
quite responsive. In 9cc264 it was increased to 10*1024*1024
to speed up decoding but that makes the UI stall very badly
under certain circumstances (e.g. when changing the baud rate
for UART by entering digits).
The reason is that every time a decoder property is changed,
the decode is restarted. Restarting the decode means that
the currently running processes need to shut down, so
they're told to do so and the GUI thread waits for them
to finish.
However, the srd_session_send() call is blocking, meaning
that libsrd will happily block the PV GUI thread until it's
done processing the current chunk of data.

For this reason, DecodeChunkLength can't be too high and
256*1024 looks like a reasonable compromise for now.

7 years agoDecodeTrace/DecodeSignal: Rework trace drawing interval
Soeren Apel [Tue, 4 Jul 2017 19:23:30 +0000 (21:23 +0200)]
DecodeTrace/DecodeSignal: Rework trace drawing interval

Before, we'd redraw the decode trace every n annotations that
came in. However, that causes a lot of unnecessary redraws
when we're zoomed out relatively far and makes the UI less
responsive in return.

Instead, use a one-shot timer with a fixed delay to redraw
the trace after data has been processed. This way, there is
an upper bound to how often we redraw the trace while at the
same time providing a fixed interval at which we update,
regardless of how many annotations came in, making the
trace fill up continuously.

With that in place, we can also remove annotation_count_
and inc_annotation_count().

7 years agoDecodeSignal: Fix restarting the decode after reloading file
Soeren Apel [Sun, 21 May 2017 17:59:59 +0000 (19:59 +0200)]
DecodeSignal: Fix restarting the decode after reloading file

7 years agoDecodeSignal: Improve auto_assign_signals() matching
Soeren Apel [Tue, 13 Jun 2017 21:28:02 +0000 (23:28 +0200)]
DecodeSignal: Improve auto_assign_signals() matching

Before, signals named "SCL analog" and "SDA analog"
wouldn't be assigned to an I2C decoder.

7 years agoDecodeSignal: Rework samplerate handling
Soeren Apel [Wed, 17 May 2017 06:31:07 +0000 (08:31 +0200)]
DecodeSignal: Rework samplerate handling

Before, running an acquisition, then changing the
samplerate and then running the acquisition again
would result in the wrong (i.e. previous) samplerate
to be used for SRD. This patch fixes this.

7 years agoDecodeSignal: Use signals for new data notification, not session
Soeren Apel [Sun, 7 May 2017 15:51:14 +0000 (17:51 +0200)]
DecodeSignal: Use signals for new data notification, not session

7 years agoDecodeSignal: Change srd session handling
Soeren Apel [Thu, 11 May 2017 07:15:55 +0000 (09:15 +0200)]
DecodeSignal: Change srd session handling

Before, we would hold onto the global srd mutex until all data
was processed and then destroy the srd session, making it
necessary to re-create the srd session (and thus run all data
through the PD again) when new data comes in.

This patch changes this so that we keep the srd session around
when we wait for input data, allowing us to re-use the existing
session when new data comes in. Also, this enables us to
release the global srd mutex when waiting, which wasn't
possible before.

7 years agoImplement logic data muxer thread
Soeren Apel [Wed, 14 Jun 2017 22:10:09 +0000 (00:10 +0200)]
Implement logic data muxer thread

Multiple changes in one commit due to complexity:
1) data::decode::Decoder: Make use of the DecodeChannel struct for
channel assigments

2) DecodeSignal: Store DecodeChannel list in vector, not map

3) DecodeSignal: Remove unused get_data()

4) Remove boost::optional usage

5) Use DecodeSignal::segment_ as the container for muxed
logic data

6) Implement the DecodeSignal::logic_mux_proc thread and its
helper method mux_logic_samples()

7) Update DecodeSignal::decode_proc() to interface with the
logic muxer thread

8) Remove no longer needed DecodeSignal::wait_for_data()

7 years agoSignalBase: Make ConversionBlockSize a class constant
Soeren Apel [Fri, 5 May 2017 20:09:42 +0000 (22:09 +0200)]
SignalBase: Make ConversionBlockSize a class constant

7 years agoMerge DecoderStack into DecodeSignal
Soeren Apel [Wed, 14 Jun 2017 06:30:43 +0000 (08:30 +0200)]
Merge DecoderStack into DecodeSignal

Several changes make up this commit, which unfortunately
can't be separated:

1) Move decoder stack management from DecoderStack to
DecodeSignal, thereby making DecoderStack unnecessary

2) Change the decoder stack from std::list to an
std::vector for direct decoder access

3) Introduce logic_mux_thread which will take care
of muxing the individual SignalBases' logic data into
(cached) logic data that libsigrokdecode expects.
This is necessary as we can no longer do simple bit
mapping within a single logic data segment's logic
data as we now may feed from multiple logic data
segments at once

4) Refactored the creation of decode traces, making
it more streamlined and flexible while simplifying
the class interface

5) Refactored the auto-assignment of channels

6) Refactored is_decode_signal()

7) Reworked decode signal save/restore, allowing
proper handling and with the decoder stack now
being part of the signal, easier save/restore of
the stack and its settings

7 years agoRework decode sample count getters
Soeren Apel [Fri, 14 Apr 2017 11:10:14 +0000 (13:10 +0200)]
Rework decode sample count getters

7 years agoRemove DecodeStack dependency from decode binding wrapper
Soeren Apel [Thu, 13 Apr 2017 16:02:20 +0000 (18:02 +0200)]
Remove DecodeStack dependency from decode binding wrapper

7 years agoMove more functionality into DecodeSignal
Soeren Apel [Wed, 12 Apr 2017 20:06:29 +0000 (22:06 +0200)]
Move more functionality into DecodeSignal

7 years agoRework decode channel auto-assignment
Soeren Apel [Tue, 13 Jun 2017 19:32:04 +0000 (21:32 +0200)]
Rework decode channel auto-assignment

7 years agoRe-use DecodeTrace::ChannelSelector as DecodeChannel
Soeren Apel [Tue, 4 Jul 2017 20:17:22 +0000 (22:17 +0200)]
Re-use DecodeTrace::ChannelSelector as DecodeChannel

7 years agoShift more methods to DecodeSignal
Soeren Apel [Sat, 8 Apr 2017 10:51:13 +0000 (12:51 +0200)]
Shift more methods to DecodeSignal

7 years agoIntroduce DecodeSignal class
Soeren Apel [Fri, 7 Apr 2017 20:18:38 +0000 (22:18 +0200)]
Introduce DecodeSignal class

For starters, we equip it with some basic wrappers
around the decode stack, rework the annotation signal
a little and use the new DecodeSignal in favor of the
SignalBase class.

7 years agoRevert 33d5aa61e77e61f700a8 to re-enable A2L conversion
Soeren Apel [Mon, 12 Jun 2017 05:06:43 +0000 (07:06 +0200)]
Revert 33d5aa61e77e61f700a8 to re-enable A2L conversion

7 years agoINSTALL: Bump requirement to libsigrokcxx >= 0.6.0.
Uwe Hermann [Mon, 26 Jun 2017 20:46:23 +0000 (22:46 +0200)]
INSTALL: Bump requirement to libsigrokcxx >= 0.6.0.

PulseView now uses APIs that are only available in
libsigrokcxx >= 0.6.0.

7 years agoMinor Doxygen comment cosmetics.
Uwe Hermann [Mon, 26 Jun 2017 20:06:23 +0000 (22:06 +0200)]
Minor Doxygen comment cosmetics.

7 years agodoc: Update pulseview(1) manpage, add --driver option (-d)
Gerhard Sittig [Wed, 7 Jun 2017 19:50:41 +0000 (21:50 +0200)]
doc: Update pulseview(1) manpage, add --driver option (-d)

7 years agomain window: Prefer the user specified device in new sessions
Gerhard Sittig [Sun, 25 Jun 2017 18:11:39 +0000 (20:11 +0200)]
main window: Prefer the user specified device in new sessions

Prefer the device that was found with user provided scan options when a
-d command line option was specified. Stick with the previous selection
of "genuine" devices before demo otherwise (when nothing was found, or
when -d was not specified).

7 years agodevice manager: Add support for -d cmdline option (driver scan options)
Gerhard Sittig [Sun, 25 Jun 2017 17:56:33 +0000 (19:56 +0200)]
device manager: Add support for -d cmdline option (driver scan options)

The previous implementation had support to auto-detect devices and to
connect to and pick devices by filling in dialogs, optionally providing
scan options that did not apply to auto-detection. This commit extends
the existing support by introducing a -d command line option similar to
sigrok-cli.

In the absence of the -d command line option, behaviour is identical to
the previous implementation. When -d is provided, the specified driver
is excluded from the auto-detection phase, and another scan is executed
afterwards where the user specified scan options take effect. This shall
result in least interaction and highest reliability of device detection,
while flexibility is increased.

Here are examples of what the -d command line option can do:

  $ pulseview -d ols:conn=/dev/ttyACM0
  $ pulseview -d fx2lafw
  $ pulseview -d demo:logic_channels=32:analog_channels=8

This fixes bug #953.

7 years agodevice manager: Move filter for supported devices to the scan routine
Gerhard Sittig [Sun, 11 Jun 2017 09:10:33 +0000 (11:10 +0200)]
device manager: Move filter for supported devices to the scan routine

Move the check for supported monotonic rate devices from the call site
into the actual scan routine.

The scan routine already used to (store and) return a variable length
set of found devices including none, and call sites can cope with this
situation. Pending extensions may call the scan routine several times,
and callers shall not duplicate the extra test condition. While we
expect the specific test for what's supported to change in the future.

7 years agosession: Add support for input format options (-I cmdline parameter)
Gerhard Sittig [Sun, 25 Jun 2017 17:40:14 +0000 (19:40 +0200)]
session: Add support for input format options (-I cmdline parameter)

The previous implementation supported the selection of an input format
by means of the -I command line option. This commit extends the feature
by adding support for colon separated input format options similar to
sigrok-cli.

This allows users to open files from the command line which previously
became only available after filling in dialogs, and resulted in errors
in the absence of options. Here is an example of how to use the option:

  $ pulseview -I csv:header:first-channel=2 -i filename.csv

This fixes bug #951.

7 years agoutil: Introduce string tokenize helper routine
Gerhard Sittig [Sun, 25 Jun 2017 11:13:01 +0000 (13:13 +0200)]
util: Introduce string tokenize helper routine

Introduce a helper routine which splits a string into tokens that were
separated by a delimiter.

7 years agoFix #982 by correcting the bounding rect for the message
Soeren Apel [Wed, 14 Jun 2017 16:38:13 +0000 (18:38 +0200)]
Fix #982 by correcting the bounding rect for the message

7 years agoCMakeLists.txt: Bump package version to 0.5.0.
Uwe Hermann [Thu, 15 Jun 2017 14:16:58 +0000 (16:16 +0200)]
CMakeLists.txt: Bump package version to 0.5.0.

0.5.0 will be the next major release. Bump now, so that
there is no confusion of tarball 0.4.0 and 0.5.0-git snapshots.

7 years agoHACKING: Prefer git pull requests over mailing list patches.
Uwe Hermann [Tue, 13 Jun 2017 15:05:55 +0000 (17:05 +0200)]
HACKING: Prefer git pull requests over mailing list patches.

Also, drop the reference to gitorious.org (no longer available).

7 years agoHACKING: Update URL to Linux kernel coding style. pulseview-unreleased
Uwe Hermann [Tue, 13 Jun 2017 14:49:11 +0000 (16:49 +0200)]
HACKING: Update URL to Linux kernel coding style.

7 years agoNEWS: Add list of user-visible changes so far.
Uwe Hermann [Sun, 11 Jun 2017 13:33:50 +0000 (15:33 +0200)]
NEWS: Add list of user-visible changes so far.

7 years agoView: Prevent header from being resized when view is resized
Soeren Apel [Mon, 12 Jun 2017 16:21:34 +0000 (18:21 +0200)]
View: Prevent header from being resized when view is resized