Marc Schink [Tue, 18 Nov 2025 16:14:44 +0000 (17:14 +0100)]
Bump minimum libzip requirement to 0.11
The commit 3406d671 ("output/srzip: Replace deprecated libzip calls")
makes use of new libzip API calls but does not bump the libzip version
requirements, fix this.
According to [1], the minimum required libzip version is now 0.11.
Andreas Sandberg [Sun, 13 Oct 2024 16:03:20 +0000 (17:03 +0100)]
fluke-dmm: Fix Fluke 28x unit mappings
The Fluke 28x unit mapping has a couple of bugs: 'dBm' incorrectly
maps to SQ_MQ_VOLTAGE and 'AAC_PLUS_DC' incorrectly maps to
SR_MQ_VOLTAGE. Fix these issues.
Yann Sionneau [Sun, 16 Mar 2025 14:11:42 +0000 (15:11 +0100)]
input/protocoldata: Check if lookup_protocol_name is valid
As of today, the code does not crash because all protocols have names.
But the name of the first element is not checked to be non-NULL
before calling strcmp(). This can result in a future crash if the
code logic changes.
This is mostly a change to robustify the lookup_protocol_name() function.
Also, this commit simplifies the indexing logic of the protocols array.
J. Neuschäfer [Tue, 13 May 2025 20:30:49 +0000 (22:30 +0200)]
tests: Replace deprecated fail(_unless) calls
A new API (ck_assert) to replace fail_* was introduced in check
0.9.6 (released in 2008), and fail_* has been deprecated since at least
0.9.10 (released in 2013).
J. Neuschäfer [Wed, 14 May 2025 13:27:07 +0000 (15:27 +0200)]
raspberrypi-pico: Add link to firmware repo
Since the Raspberry Pi Pico is a programmable device with a myriad of
use-cases, it needs specific firmware to implement the same protocol as
the driver in src/hardware/raspberrypi-pico.
Add a link to make it easier to find the right firmware.
J. Neuschäfer [Wed, 14 May 2025 12:27:47 +0000 (12:27 +0000)]
hardware/beaglelogic: Don't include incorrect header <sys/errno.h>
The libc's errno API[1] comes from <errno.h>, not <sys/errno.h>.
On musl-libc, a warning is produced when the latter is used:
In file included from src/hardware/beaglelogic/beaglelogic.h:26,
from src/hardware/beaglelogic/protocol.c:33:
/usr/include/sys/errno.h:1:2: warning: #warning redirecting incorrect #include <sys/errno.h> to <errno.h> [-Wcpp]
1 | #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
| ^~~~~~~
Is it not necessary to change <sys/errno.h> to <errno.h>, because
individual C files in the beaglelogic driver already include <errno.h>.
schuma-gta02 [Fri, 24 Nov 2023 15:56:25 +0000 (16:56 +0100)]
dmm/vc96: Fixed wrong detection and calculation.
- check against " " (two spaces) for info->is_unitless (line 137)
- introduced the handling of the returncode of sr_atof_ascii (line 73)
- explanation for ignoring case in line 132 added
This was masked when configure is called with --enable-all-drivers as this
parameter is counted as an enabled driver (even though it technically isn't).
Erik Schilling [Fri, 12 Jan 2024 13:38:31 +0000 (14:38 +0100)]
configure: differ between check and yes/no
So far one could only specify yes/no (optionally for all drivers through
--enable-all-drivers={yes,no}). However, even when stating a =yes, the
dependency check would override it to a =no if the dependencies are
missing.
This is a bit annoying for scripts since a script may specify
--enable-foo-driver=yes but in fact the build may not contain
`foo-driver` due to missing build dependencies. This is especially
problematic for distro's which look like they currently do not build a
defined driver set - which results in random drivers missing [1].
This fixes that by following the autoconf examples [2] that allow a third
state `check`. With that `no` means no, `yes` means yes (raise an error
if deps are unavailable) and `check` gracefully disables drivers with
unavailable dependencies.
With that --enable-all-drivers can be used to ensure that all drivers are
built in. Certain drivers can still be explicitly disabled by overriding
the individual driver setting.
This way distros can specify --enable-all-drivers and new drivers with
unmet dependencies will cause an error rather than silently getting
dropped of the build.
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.
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.
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].
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
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:
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
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.
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.