Paul Kasemir [Mon, 12 Dec 2022 18:54:25 +0000 (11:54 -0700)]
link-mso19: Refactor mso_limit_trigger_level to mso_set_trigger_level
Function acts as a setter now, instead of updating devc based on
existing settings.
Min and max limits are now easier to understand.
Paul Kasemir [Mon, 12 Dec 2022 22:14:43 +0000 (15:14 -0700)]
link-mso19: Change update functions to setter functions
mso_update_trigger_pos(devc) -> mso_set_trigger_pos(devc, pos)
mso_update_offset_value(devc) -> mso_set_offset_value(devc, offset)
Paul Kasemir [Mon, 12 Dec 2022 21:19:28 +0000 (14:19 -0700)]
link-mso19: Add comments and macros for magic numbers
Also make the code mso_calc_trigger_threshold easier to understand.
Paul Kasemir [Mon, 12 Dec 2022 21:11:59 +0000 (14:11 -0700)]
link-mso19: Style changes to keep lines less than 80 chars
Paul Kasemir [Mon, 12 Dec 2022 19:04:12 +0000 (12:04 -0700)]
link-mso19: Refactor code style to declare variables first
Variables are now declared without any value, and then set later in
the code.
Paul Kasemir [Mon, 12 Dec 2022 19:00:18 +0000 (12:00 -0700)]
link-mso19: Rename variables to be more descriptive
Paul Kasemir [Mon, 12 Dec 2022 18:54:25 +0000 (11:54 -0700)]
link-mso19: Remove update function mso_update_logic_threshold_value
Paul Kasemir [Mon, 12 Dec 2022 18:49:36 +0000 (11:49 -0700)]
link-mso19: Use upper case CG_IS_DIGITAL/CG_IS_ANALOG macro names
Paul Kasemir [Wed, 9 Jun 2021 03:14:02 +0000 (21:14 -0600)]
link-mso19: Use correct value for 5MHz sample rate
Paul Kasemir [Sun, 27 Dec 2020 04:28:10 +0000 (21:28 -0700)]
link-mso19: Add offset config option
Paul Kasemir [Sat, 26 Dec 2020 04:18:05 +0000 (21:18 -0700)]
link-mso19: Add logic_threshold config option
Paul Kasemir [Fri, 18 Dec 2020 07:42:07 +0000 (00:42 -0700)]
link-mso19: Fixup horiz_triggerpos and add trigger location
Paul Kasemir [Wed, 16 Dec 2020 09:59:34 +0000 (02:59 -0700)]
link-mso19: Add trigger_level config option
Paul Kasemir [Mon, 14 Dec 2020 04:32:57 +0000 (21:32 -0700)]
link-mso19: Add probe_factor config option
Paul Kasemir [Wed, 9 Dec 2020 08:05:47 +0000 (01:05 -0700)]
link-mso19: Setup triggers to basic working state
Paul Kasemir [Sat, 5 Dec 2020 07:18:18 +0000 (00:18 -0700)]
link-mso19: Add coupling config option
Paul Kasemir [Sat, 5 Dec 2020 06:06:58 +0000 (23:06 -0700)]
link-mso19: Rework avoid unnecessary endian conversion
Utilizing compile time endian correction instead of using
runtime macros.
Paul Kasemir [Fri, 4 Dec 2020 04:45:37 +0000 (21:45 -0700)]
link-mso19: Fixup code to get basic analog and digital data working
Paul Kasemir [Fri, 4 Dec 2020 04:49:35 +0000 (21:49 -0700)]
link-mso19: Remove unused (and invalid) LED function
Paul Kasemir [Mon, 16 Nov 2020 08:58:40 +0000 (01:58 -0700)]
link-mso19: Fixup the scan function to work properly
This device depends on libserialport to collect the usb serial number
which contains device specific parameters.
Paul Kasemir [Sat, 14 Nov 2020 06:18:27 +0000 (23:18 -0700)]
link-mso19: Re-enable building this hardware
Paul Kasemir [Sat, 14 Nov 2020 08:18:54 +0000 (01:18 -0700)]
link-mso19: Remove stale code to get driver to compile
serial_write() doesn't exist anymore, for example.
Paul Kasemir [Sat, 14 Nov 2020 06:23:13 +0000 (23:23 -0700)]
link-mso19: Update files to match new driver templates better
ettom [Tue, 24 Oct 2023 19:43:06 +0000 (22:43 +0300)]
gwinstek-psp: Initial implementation
ettom [Mon, 30 Oct 2023 20:00:58 +0000 (22:00 +0200)]
gwinstek-psp: Initial driver skeleton
Bert Vermeulen [Thu, 10 Oct 2024 20:35:04 +0000 (22:35 +0200)]
siglent-sdl10x0: Fix compile warning
Bert Vermeulen [Fri, 4 Oct 2024 08:12:16 +0000 (10:12 +0200)]
lecroy-xstream: Fix memory leak
Inspired by https://github.com/sigrokproject/libsigrok/pull/162
Thanks Lucien Murray-Pitts.
Timo Boettcher [Fri, 27 Sep 2024 22:20:32 +0000 (00:20 +0200)]
siglent-sdl10x0: Implement Siglent SDL10x0 electronic load driver
Timo Boettcher [Thu, 19 Sep 2024 20:37:53 +0000 (22:37 +0200)]
siglent-sdl10x0: Initial driver skeleton
Timo Boettcher [Fri, 27 Sep 2024 22:19:33 +0000 (00:19 +0200)]
libsigrok.h: Add SR_CONF_OVER_POWER_PROTECTION_* and SR_CONF_RESISTANCE
These are used for electronic loads like the Siglent SDL10x0.
Andreas Sandberg [Thu, 3 Oct 2024 22:51:58 +0000 (23:51 +0100)]
fluke-dmm: Move device-specific DM handling
With the exception of the Fluke 28x series, device-specific DM
handling is currently handled in protocol.c. Move this to separate
files for clarity.
Signed-off-by: Andreas Sandberg <redacted>
Andreas Sandberg [Thu, 3 Oct 2024 16:40:12 +0000 (17:40 +0100)]
fluke-dmm: Remove device-specific float precision helper
The Fluke DMM driver has a helper function that determines the
precision of a float. This functionality is now provided by strutil.
Signed-off-by: Andreas Sandberg <redacted>
Andreas Sandberg [Sun, 29 Sep 2019 21:48:52 +0000 (22:48 +0100)]
fluke-dmm: Cleanup Fluke 28x QM handling
The code that parses QM responses from Fluke 28x DMMs uses a long
series of if-else statements to determine the type of measurement
reported by the device. Rewrite this to use a conversion table that
contains a mapping between DMM units and Sigrok's internal units.
Signed-off-by: Andreas Sandberg <redacted>
Andreas Sandberg [Thu, 3 Oct 2024 16:35:53 +0000 (17:35 +0100)]
strutil: Add a atof variant that determines precision
There is already a helper to convert a string to a double and
determine its precision. Add a helper that does this for floats as
well.
Signed-off-by: Andreas Sandberg <redacted>
Andreas Sandberg [Thu, 3 Oct 2024 16:34:43 +0000 (17:34 +0100)]
strutil: Add a helper to get the precision of a float
There are a few different instruments where the precision of a
measurement can be determined from the number of decimals in the
reported floats. Add a helper to determine this.
The implemented version of sr_count_digits performs more stringent
error checking than the original version in
sr_atod_ascii_digits. There are two reasons for this: First, we can no
longer rely on atod failing if the provided value is invalid. Second,
there are exotic float formats accepted by atod that we don't support
and we don't want to be in a situation where atod accepts a value and
count digits returns an incorrect value.
Signed-off-by: Andreas Sandberg <redacted>
Marc Schink [Thu, 12 Sep 2024 12:18:20 +0000 (14:18 +0200)]
bindings/python: Use implicit namespaces
The use of 'namespace_packages' is deprecated [1] and for Python >= 3.3,
implicit/native namespaces should be used. There are no incompatibilities
as we require Python >= 3.8. More details can be found in [2] and [3].
[1] https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
[2] https://packaging.python.org/en/latest/guides/packaging-namespace-packages/
[3] https://peps.python.org/pep-0420/
Soeren Apel [Sat, 28 Sep 2024 23:23:34 +0000 (01:23 +0200)]
scpi-pps: Minor style fix
Kota Ando [Tue, 5 Jul 2022 12:10:33 +0000 (21:10 +0900)]
scpi-pps: Add Keysight
E36300A
- Add
E36311A,
E36312A, and
E36313A
- Tested using
E36312A via LAN and smuview
Ralf [Fri, 23 Oct 2020 18:15:12 +0000 (20:15 +0200)]
rigol-dg: Announce counter channels for dg1000z only
Ralf [Fri, 23 Oct 2020 17:49:29 +0000 (19:49 +0200)]
rigol-dg: Read back parameters for MSO5000
Ralf [Fri, 23 Oct 2020 14:57:31 +0000 (16:57 +0200)]
rigol-dg: Reduce unnecessary conversions between waveform and string repr
Ralf [Fri, 23 Oct 2020 10:00:02 +0000 (12:00 +0200)]
rigol-dg: Use user name in waveform spec for rigol_dg_waveform_to_string
Ralf [Fri, 23 Oct 2020 05:19:38 +0000 (07:19 +0200)]
rigol-dg: Add user name to waveform spec to allow consistent mapping functions
Ralf [Thu, 22 Oct 2020 16:37:21 +0000 (18:37 +0200)]
rigol-dg: Add some more waveforms for MSO5000
Known issue: Read-back of parameters does not work.
Caused by changing :SOUR:APPL to :SOUR:FUNC, because APPL only
supports NOIS, PULS, RAMP, SIN, SQU, USER.
When MSO5000 is configured to a different waveform, there is no answer at all.
sr: [00:00.051760] scpi_vxi: Successfully sent SCPI command: 'SOUR1:APPL?'.
sr: [00:02.056361] scpi_vxi: Device read failed for 192.168.1.250 with error 15
Ralf [Thu, 22 Oct 2020 15:45:09 +0000 (17:45 +0200)]
rigol-dg: Move string to waveform mapping into separate function
Ralf [Wed, 21 Oct 2020 17:31:16 +0000 (19:31 +0200)]
rigol-dg: Add basic commands for MSO5000 models
Ralf [Tue, 20 Oct 2020 18:19:03 +0000 (20:19 +0200)]
rigol-dg: Handle unknown waveform types and abort gracefully
Sven Wegener [Sat, 31 Aug 2024 19:11:58 +0000 (21:11 +0200)]
configure: quote argument to SR_APPEND
./configure: line 19086: zlib: command not found
because of
sr_deps_avail=${sr_deps_avail}${sr_deps_avail:+' '}crc32 zlib
Signed-off-by: Sven Wegener <redacted>
Soeren Apel [Thu, 26 Sep 2024 20:38:20 +0000 (22:38 +0200)]
input/isf: Minor style fixes
Filip Kosecek [Fri, 9 Feb 2024 11:56:34 +0000 (12:56 +0100)]
input/isf: make WFMTYPE an optional header item
Filip Kosecek [Tue, 6 Feb 2024 13:22:01 +0000 (14:22 +0100)]
input: add import module for Tektronix ISF file format
Tektronix devices use ISF format to store captured data.
The format varies depending on the device, so the module
tries to be as general as possible.
g-user [Tue, 8 Feb 2022 21:24:32 +0000 (22:24 +0100)]
zeroplus-logic-cube: Add external clock settings
Enables the "external clock mode" in the Zeroplus LAP-C Logic
Cube driver (falling and rising edge) so that this mode also can be used in
sigrok-cli and pulseview
Mike McCauley [Tue, 28 Jun 2022 00:51:29 +0000 (10:51 +1000)]
serial-dmm: Add support for Digitech QM1576 serial protocol parser
The protocol is described at https://www.airspayce.com/mikem/QM1578/protocol.txt
You can use this decoder with libsigrok and Digitech QM1578 via ESP32 Bluetooth-Serial converter available from the author at: https://www.airspayce.com/mikem/QM1578/QM1578BluetoothClient.ino which connects to the QM1578 over Bluetooth LE, fetches the data stream and sends it on the serial port to the host, where this driver can read it with this command for example:
sigrok-cli --driver digitech-qm1578:conn=/dev/ttyUSB1 --continuous
Ken Taylor [Sat, 7 Oct 2023 09:02:12 +0000 (02:02 -0700)]
openbench-logic-sniffer: Properly set samplerate range
Driver does query max_samplerate from SUMP metadata,
but previously replied to SR_CONF_SAMPLERATE with fixed
1Hz-200MHz range. Update to use max_samplerate as top
of range.
May fix http://sigrok.org/bugzilla/show_bug.cgi?id=1465
Ken Taylor [Sun, 8 Oct 2023 08:07:05 +0000 (01:07 -0700)]
openbench-logic-sniffer: Close serial port if device scan fails
Pavel Fedin [Tue, 21 Nov 2023 20:11:38 +0000 (23:11 +0300)]
openbench-logic-sniffer/protocol: Fix hardcoded unitsize
Some output modules, like srzip, calculate unitsize from maximum number of
channels in the session; and throw an error if the actual datastream uses
bigger size. Remove hardcoded value of 4 and calculate it from maximum number
of channels, supported by the device. Other driver seem to do the same.
This fixes "Unexpected unit size" saving a capture, made by an OLS device with
small number of channels.
The bug was found by using gillham's Arduino analyzer
(https://github.com/gillham/logic_analyzer), which supports a maximum of 8
channels. According to the error message, srzip expected unitsize == 1.
Signed-off-by: Pavel Fedin <redacted>
Marc Schink [Fri, 29 Mar 2024 14:11:08 +0000 (15:11 +0100)]
bindings/swig: Make Device::connection_id() an attribute
Signed-off-by: Marc Schink <redacted>
Marc Schink [Wed, 20 Mar 2024 14:00:06 +0000 (15:00 +0100)]
bindings/swig: Make Device::serial_number() an attribute
Convert Device::serial_number() to an attribute string as for other
functions such as vendor() and model().
Signed-off-by: Marc Schink <redacted>
Marc Schink [Wed, 31 Jan 2024 10:09:54 +0000 (11:09 +0100)]
Add SR_CONF_DELAY_GENERATOR
Signed-off-by: Marc Schink <redacted>
Marc Schink [Wed, 7 Feb 2024 15:15:31 +0000 (16:15 +0100)]
Add SR_CONF_INVERTED
Many device such as oscilloscopes, signal and delay generators are
capable to invert signals or change their polarity.
Add a new configuration to implement such a feature. The term 'inverted'
is chosen in favor of 'polarity' because the former can be unambiguously
represented by a boolean value.
Signed-off-by: Marc Schink <redacted>
Marc Schink [Tue, 20 Feb 2024 17:19:54 +0000 (18:19 +0100)]
backend: Add missing #ifdef for zlib
Add #ifdef statement since zlib is optional. At the moment an empty
version string is used when zlib is not available:
backend: Libs: glib 2.72.4 (rt: 2.72.4/7204:4), zlib , libzip 1.7.3,
Signed-off-by: Marc Schink <redacted>
Marc Schink [Wed, 20 Mar 2024 08:12:41 +0000 (09:12 +0100)]
tcp: Fix memory leak in sr_tcp_dev_inst_free()
Signed-off-by: Marc Schink <redacted>
Marc Schink [Wed, 20 Mar 2024 08:12:24 +0000 (09:12 +0100)]
tcp: Fix documentation of sr_tcp_dev_inst_free()
Signed-off-by: Marc Schink <redacted>
Soeren Apel [Tue, 13 Aug 2024 21:24:36 +0000 (23:24 +0200)]
udev rules: Add Logian-16L devices
René Pecher [Mon, 22 Jan 2024 17:12:33 +0000 (18:12 +0100)]
zeroplus-logic-cube: Add second USB PID for Meilhaus Logian-16L
MGWGIT [Tue, 11 Jun 2024 15:56:32 +0000 (18:56 +0300)]
scpi-pps: Fix rigol dp832 power config
Soeren Apel [Tue, 13 Aug 2024 09:35:20 +0000 (11:35 +0200)]
Revert "Preliminary support to use soundcard as oscilloscope via SDL2"
This reverts commit
6cb2273d40e880e3ecec3cb7c82ea13ea223b5e8.
Marc Schink [Fri, 26 Jan 2024 15:06:06 +0000 (16:06 +0100)]
scpi-pps: Add support for R&S NGE100B series
Tested with NGE103B power supply.
Signed-off-by: Marc Schink <redacted>
Tomas Mudrunka [Tue, 6 Feb 2024 20:07:01 +0000 (21:07 +0100)]
Preliminary support to use soundcard as oscilloscope via SDL2
Gerhard Sittig [Mon, 1 Jan 2024 13:37:50 +0000 (14:37 +0100)]
output/csv: use intermediate time_t var, silence compiler warning
There are platforms where timeval and time_t disagree on the width of
the data type of the field which holds seconds. Passing a pointer to an
unexpected type results in warnings (and probably unreliable execution).
Assign the value which is gotten from a timeval to an intermediate
time_t variable, so that the ctime() invocation becomes portable.
Gerhard Sittig [Mon, 1 Jan 2024 13:26:25 +0000 (14:26 +0100)]
input/protocoldata: silence build warnings, adjust printf formats
Properly use %zu for size_t, and %PRIu64 for uint64_t data types. This
silences build warnings which previously went unnoticed because their
occurance depends on the target platform.
Gerhard Sittig [Fri, 29 Dec 2023 11:39:05 +0000 (12:39 +0100)]
output/srzip: reduce text line length, remove "dead code"
Move an instruction to reduce its text line length. Also happens to put
the calculation of remaining buffer space and the current write position
in closer proximity, improving maintainability in the process.
Remove an assignment after appending to the archive and before iterating
the input samples loop again. Eliminates code that never took effect.
The value gets determined at the loop body's start anyway.
Gerhard Sittig [Fri, 29 Dec 2023 11:32:45 +0000 (12:32 +0100)]
output/srzip: accept arbitrary input and output unit sizes
Commit
c03aaf342c3f introduced a check and refused to store sample data
when the feed would not exactly match an expected width that was derived
from the device's or input's total count of logic channels. Earlier
versions assumed the match but never checked (immediately forwarded
session feed content to the ZIP archive). Existing applications may not
be prepared to process the resulting archive where meta data and samples
disagree on essential properties. The fatal condition aborted execution,
which was perceived as a regression. A message was added later to
communicate that the condition was hit, but its WARN severity was
misleading, and its meaning still was obscure to users.
This commit extends the reception of sample data in the session feed and
its accumulation in the local buffer before ZIP archive appends. Any
combination of input and output unit sizes are accepted. It's perfectly
legal for sources to not communicate data for disabled channels, as well
as to communicate wider data images than strictly necessary to simplify
their support for a variety of input formats or device models. Details
are available to users at higher log levels (INFO). Default levels only
communicate fatal conditions (which should be implementation flaws now
exclusively).
The issue reproduces especially well with input formats that are rather
flexible, or device drivers which support a range of devices with many
configurations or models of differing capabilities. The issue was most
recently reported for the OLS driver and an Arduino SUMP firmware. Given
how many input modules and device drivers can feed into a few output
modules, it's assumed that addressing the general issue in a common
location is preferrable over local adjustment of individual input
modules or device drivers. Adjusting both places doesn't harm either,
increases overall robustness.
The implementation results in a negligable runtime overhead for the
regular case of matching unit sizes (a few integer checks). And an
acceptable overhead when the session feed is wider than the srzip
archive's unit size (multiple memcpy() calls where previously was only
one which would have been incorrect without the consistency check). The
code path which needs to apply padding to the output is most expensive,
but the implementation is only as expensive as it needs to be. The added
cost only occurs in the case of mismatches, which were not handled at
all before this change. The combination of extensive diagnostics and
internal consistency checks shall increase robustness and help during
future maintenance.
Reported-By: Pavel Fedin <redacted>
Gerhard Sittig [Fri, 29 Dec 2023 11:24:06 +0000 (12:24 +0100)]
output/srzip: rename variables for samples counts
The srzip output module deals with a number of samples that are of a
given width (unit size). Rename variables to better tell item counts
from byte counts. See a word diff for review.
Gerhard Sittig [Fri, 29 Dec 2023 11:17:31 +0000 (12:17 +0100)]
output/srzip: rename variable for archive unit size
The srzip output module needs to deal with two unit sizes. One that got
derived from the device's or input's logic channels' total count, and
will end up being used in the ZIP archive. And one which is seen when
the session feed provides sample data.
Rename the identifier to reflect this distinction. See a word diff for
the essence of the change.
Also rephrase the zip_append_queue() invocation for improved
readability. Use line breaks to illustrate parameter sets which are
related, and separate them from other parameters which are unrelated.
Marc Schink [Wed, 26 Apr 2023 08:50:49 +0000 (10:50 +0200)]
scpi/serial: Add USB VID/PID for R&S HMC808x series
Signed-off-by: Marc Schink <redacted>
Marc Schink [Mon, 5 Dec 2022 13:12:26 +0000 (14:12 +0100)]
contrib: Add udev rule for R&S HMC804x series (USBTMC)
Signed-off-by: Marc Schink <redacted>
Marc Schink [Wed, 12 Apr 2023 05:13:55 +0000 (07:13 +0200)]
scpi-pps: Add support for R&S HMC8042
Signed-off-by: Marc Schink <redacted>
Marc Schink [Thu, 20 Apr 2023 17:28:19 +0000 (19:28 +0200)]
scpi-pps: Add OCP support for R&S HMC8043
Signed-off-by: Marc Schink <redacted>
Marc Schink [Thu, 20 Apr 2023 17:25:58 +0000 (19:25 +0200)]
scpi-pps: Add support for SR_CONF_OVER_CURRENT_PROTECTION_DELAY
Prepare the driver for the 'over-current protection delay' feature. For
now, this feature is disabled for all currently supported devices.
Signed-off-by: Marc Schink <redacted>
Marc Schink [Thu, 20 Apr 2023 17:21:13 +0000 (19:21 +0200)]
hwdriver: Add SR_CONF_OVER_CURRENT_PROTECTION_DELAY
This config key allows to specify the delay before the over-current
protection triggers.
Signed-off-by: Marc Schink <redacted>
Gerhard Sittig [Thu, 21 Dec 2023 20:24:33 +0000 (21:24 +0100)]
greatfet: feed the session with constant width sample data
Rename identifiers to tell the sigrok session feed's width and the width
of sample data in device firmware communication apart. Always feed the
session with sample data of a width which corresponds to the device's
channels count. Some output modules and applications may not be prepared
to handle different cases.
Gerhard Sittig [Thu, 21 Dec 2023 20:22:43 +0000 (21:22 +0100)]
tests: adjust test coverage for power of two and input value 0
An input value 0 for the sr_next_power_of_two() routine is not invalid
any longer. Remove the test case that is expected to fail. Add a regular
case to cover that code path instead.
Gerhard Sittig [Thu, 21 Dec 2023 20:20:55 +0000 (21:20 +0100)]
strutil: support special case in power of two calculation
The sr_next_power_of_two() helper routine rejected input value 0
(an index), considered this case invalid. It is not, requires 1 bit
to hold the value. Return a "power of two" value of 1 for that input,
callers expect that result.
Gerhard Sittig [Mon, 27 Nov 2023 18:12:11 +0000 (19:12 +0100)]
hantek-dso: eliminate the "forced trigger" option value
Commit
c93f113879a0 introduced a hack on top of an unfortunate choice.
It seems counter intuitive to open code a default trigger source on an
arbitrary channel, and have users override it with the "forced" value
to _not_ use a trigger.
The normal approach would be to specify a trigger when a trigger should
be used, and to not specify a trigger when no trigger should be used.
Eliminate the "forced" choice in the trigger_sources[] list. Start with
a not-set value. Accept when a value is specified (a "genuine" choice).
Don't bother adding support to "un-set" the previously specified choice.
This leaves the intuitive support for trigger specs that shall be used,
and only uses triggers when they were specified. Does not provide means
to "un-set" an earlier specified trigger config as the implementation
did before the 2023-09 change, which would be the 2021-02 status.
If the approach implemented here should be considered undesirable, then
a "none" option value should be introduced, something that much better
communicates to users what's happening and what the consequence of a
config choice would be.
This commit also adjusts the "ugh" code path which differed from the
"capture empty" code path. Fixes a resource leak in the config set path.
The "set trigger source" and "set trigger and samplerate" commands don't
agree on the phrase for the trigger source in the wire format. But have
been doing that before the forced trigger introduction, behaviour
remains unchanged here.
fenugrec [Mon, 20 Nov 2023 22:30:48 +0000 (17:30 -0500)]
siglent-sds: incorrect g_array_free call
Since we are not keeping the array's data, arg must be TRUE to free it.
reported by Fr3ya on github as PR #207
fenugrec [Mon, 20 Nov 2023 22:27:36 +0000 (17:27 -0500)]
siglent-sds: reduce indentation
[ see a word diff for review ]
fenugrec [Mon, 20 Nov 2023 22:19:39 +0000 (17:19 -0500)]
drivers: assign driver_list with g_array_free()
To make it clear we are free'ing the array while keeping its data, use
the return value from g_array_free(). Keep the cast since ret type
is a gchar*.
Thomas Emmert [Sun, 28 Nov 2021 20:52:49 +0000 (21:52 +0100)]
contrib: add udev rule for Voltcraft DSO2020
[ gsi: fixup commit message ]
Thomas Emmert [Sun, 28 Nov 2021 20:40:30 +0000 (21:40 +0100)]
hantek-6xxx: add support for Voltcraft DSO2020
[ gsi: fixup whitespace and commit message ]
Gerhard Sittig [Sun, 29 Oct 2023 16:40:16 +0000 (17:40 +0100)]
greatfet: support capture of the upper pin bank (first pin 8)
Present all 16 channels to users. By default lower channels are enabled
and upper channels are disabled. Support the configuration where users
capture upper channels after disabling lower channels. Device firmware
provides the "first pin" feature and only communicates pin states for
the upper bank to the host.
This mode of operation can be useful to inspect different signal sets
without physically moving probes. Upper bank capture combines well with
higher rates at lower pin counts.
This implementation in theory also covers 16 channel captures, though
the firmware does not officially support multi-bank captures. Emit a
warning when this setup gets detected, but don't refuse operation and
attempt a best effort capture.
This commit also improves reliability in paths where failed acquisition
starts shutdown the operation, before another request gets serviced.
Gerhard Sittig [Sun, 29 Oct 2023 16:37:59 +0000 (17:37 +0100)]
greatfet: don't print misleading "unknown" libusb error text
Only lookup libusb error messages for negative return values which
communicate error codes. Positive return values are transmission counts
and are not an error.
The "UNKNOWN" messages only were seen at higher log levels. Users were
not affected by the issue.
Gerhard Sittig [Fri, 6 Oct 2023 14:38:47 +0000 (16:38 +0200)]
contrib: add udev rule for GreatFET One by Great Scott Gadgets
Gerhard Sittig [Fri, 6 Oct 2023 16:09:58 +0000 (18:09 +0200)]
greatfet: first operational GreatFET One driver implementation
This sigrok driver for the GreatFET One device as a logic analyzer is
based on https://github.com/Qyriad/libsigrok and was massaged to use
common infrastructure where appropriate, and adjust coding style to
match the sigrok.org project's code base.
This implementation supports the acquisition of 8 channels at rates up
to 40.8MHz, and higher rates up to 204MHz for reduced channel counts.
Soft triggers are not supported in this implementation, ideally common
support would cover this more transparently in the future.
Tested with v2021.2.1 firmware as available via 'pip install greatfet'.
Support for 16 channels is prepared but disabled by default. Requires
firmware support which is not officially available.
Gerhard Sittig [Fri, 6 Oct 2023 14:40:04 +0000 (16:40 +0200)]
greatfet: Initial driver skeleton.
Marek Vasut [Sat, 28 Oct 2023 07:12:48 +0000 (09:12 +0200)]
analog: Get GString content from proper API call
Use the g_string_free() routine's return value instead of pulling the
string content out of the buffer structure bypassing the library's API.
Signed-off-by: Marek Vasut <redacted>
Marek Vasut [Sat, 28 Oct 2023 07:12:48 +0000 (09:12 +0200)]
ols: Get GString content from proper API calls
Use the g_string_free() routine's return value instead of pulling the
string content out of the buffer structure bypassing the library's API.
This improves portability and readability, also happens to silence an
"ignoring return value" warning which is seen with GCC 13.2.0.
See https://docs.gtk.org/glib/method.String.free.html#return-value for
a discussion of the g_string_free() return value.
Signed-off-by: Marek Vasut <redacted>
Gerhard Sittig [Tue, 17 Oct 2023 19:28:16 +0000 (21:28 +0200)]
output/srzip: decorate read pointer as const for awareness
Recipients of sample data as received from the data feed should consider
this data read-only, they are handed a reference to a message which is
also sent to other recipients.
Add the 'const' decoration in the output/srzip module to raise awareness
during future maintenance.
Gerhard Sittig [Tue, 17 Oct 2023 19:25:00 +0000 (21:25 +0200)]
yokogawa-dlm: silence compiler warning (passing an empty array)
Rephrase the config_list() routine such that it does not attempt to
access the first item in an empty array. Be explicit about the digital
channel group's devopts being empty by design, add a comment.
The compiler warning could have been a false positive, but phrasing the
source code differently doesn't harm either, eliminates uncertainty.
Gerhard Sittig [Tue, 17 Oct 2023 19:22:32 +0000 (21:22 +0200)]
tests: implement strutil test cases for power-of-two calculation
Add the "calc" section to the strutil tests, and implement test cases
which cover the power-of-two calculation routine. Cover small values
which are the immediate use case and the motivation for introducing the
helper routine.