Commit Graph

4478 Commits

Author SHA1 Message Date
Soeren Apel 6984cfb245 Rework sr_period_string 2017-03-07 17:13:46 +01:00
Matthieu Guillaumin ae87e02fad pce-322a: Adding support for reading memory from PCE-322A SPL 2017-03-07 14:09:46 +01:00
Uwe Hermann f5066b2b61 configure summary: Show linker flags. 2017-03-05 16:38:48 +01:00
Uwe Hermann 54d8d22a93 configure summary: Show whether shared/static build is enabled. 2017-03-04 18:20:38 +01:00
Uwe Hermann 6d13a46ce0 lecroy-xstream: Drop some unneeded "lecroy_" prefixes.
For the time being this driver only handles LeCroy devices, so those
prefixes are not needed.
2017-03-02 21:22:10 +01:00
Uwe Hermann b295fa5190 lecroy-xstream: Drop prototypes for non-existing functions. 2017-03-02 21:22:10 +01:00
Uwe Hermann ea257cdc23 lecroy-xstream: Minor whitespace and consistency fixes. 2017-03-02 21:22:10 +01:00
Soeren Apel 9de47e9e71 lecroy-xstream: Use sr_period_string() 2017-03-02 21:22:10 +01:00
Soeren Apel 7002e64a54 lecroy-xstream: Fix compiler warnings 2017-03-02 21:22:10 +01:00
Soeren Apel d0b913eac4 lecroy-xstream: Don't send custom SCPI command to the probed device 2017-03-02 21:22:00 +01:00
Soeren Apel bb08570f1a lecroy-xstream: Change human-readable name 2017-03-02 15:49:49 +01:00
Sven Schnelle 3f2c7c94a1 lecroy-xstream: Add the actual driver implementation
Signed-off-by: Sven Schnelle <svens@stackframe.org>
2017-03-02 15:39:44 +01:00
Sven Schnelle e3b83c5ec3 lecroy-xstream: Initial driver skeleton.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
2017-03-02 15:39:44 +01:00
Uwe Hermann 0d9841ddd6 rohde-schwarz-sme-0x: Add support for SR_CONF_SIGNAL_GENERATOR. 2017-03-02 15:18:02 +01:00
Uwe Hermann 6928c4a928 Add SR_CONF_SIGNAL_GENERATOR. 2017-03-02 15:17:53 +01:00
Uwe Hermann d7056eead2 rohde-schwarz-sme-0x: Drop prototypes for non-existing functions. 2017-03-02 14:56:46 +01:00
Uwe Hermann ed1fae0bb3 rohde-schwarz-sme-0x: Minor whitespace and consistency fixes. 2017-03-02 14:56:46 +01:00
Soeren Apel 9e50659470 rohde-schwarz-sme-0x: Coding style fixes 2017-02-26 21:02:03 +01:00
Vlad Ivanov a28b3df111 rohde-schwarz-sme-0x: Initial device support
Signed-off-by: Vlad Ivanov <vlad.ivanov@lab-systems.ru>
2017-02-26 21:02:03 +01:00
Uwe Hermann 97c2710b2c hwdriver: Drop unneeded debug message.
The logs already show scan attempts per-driver, no need to also log the
init per-driver, since that's always happening and cannot (normally) fail.
2017-02-26 15:43:35 +01:00
Sven Schnelle 6ca578feb8 Fix analog output display
I've seen the following output from sigrok-cli:

CH1: 478.720 mV
CH1: -514 mV
CH1: -0 V

I added some debug, and it seems like the digits value isn't reset
to the actual value after calling sr_analog_si_prefix_friendly():

using 6 digits
value2 0.478720 digits 6
value2 -0.513536 digits 3
value2 -0.487424 digits 0

This commit fixes this by resetting the value to the actual value before.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
2017-02-15 08:57:04 +01:00
Sven Schnelle 471ac344a5 Fix initial sample value for demo driver
devc->step is not reset on acquistion start, so acquisition
starts with a different value every time. Thats annoying when
using the demo driver to debug sigrok, so lets make sure that
it's reset to 0.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
2017-02-14 23:32:45 +01:00
Marcus Comstedt b020b81b24 Build: fix #865 yet again
It appears that the symmetry changes of setting CC and CFLAGS correctly
for C code compilation in commit 104f02f broke things for people using
some other version of setuptools which uses those vars instead of
CXX and CXXFLAGS when compiling C++ code. In order to make this work
everywhere, set _both_ sets of variables as required for C++ compilation.
No C code is compiled by the python binding module anyway.
2017-02-02 11:04:44 +01:00
Uwe Hermann 1d82f9ade3 README.devices: Update hantek-6xxx entry. 2017-01-27 01:14:02 +01:00
Uwe Hermann efcdec00b7 z60_libsigrok.rules: Add Hantek 6022BL. 2017-01-27 01:12:20 +01:00
Sebastian Tabares Amaya 759f2ef762 Add support for Hantek 6022BL 2017-01-27 01:12:14 +01:00
Aurelien Jacobs 0ceb70381b agilent-dmm: Add support for U124xC. 2017-01-22 19:03:29 +01:00
Aurelien Jacobs 1af3f40eec agilent_dmm: Split generic part of recv_log_u128x() to recv_log(). 2017-01-22 19:03:29 +01:00
Aurelien Jacobs 29bdeeb549 agilent-dmm: Add support for Vsense (Non-Contact Voltage). 2017-01-22 19:03:29 +01:00
Aurelien Jacobs c2e3c322e6 agilent-dmm: Fix handling of the 2nd channel of 2 channels models.
The 2nd channel of those models is not limited to temperature,
so it is necessary to query CONF? @2.
2017-01-22 19:03:29 +01:00
Aurelien Jacobs 4fdedbbb3a agilent-dmm: Set correct length in strncmp(). 2017-01-22 19:03:29 +01:00
Aurelien Jacobs 841aadc95b libsigrok.h: Add SR_MQ_HARMONIC_RATIO. 2017-01-22 19:03:29 +01:00
Uwe Hermann 35bb2fcef9 scpi_serial: Convert 'got_newline' variable to gboolean. 2017-01-21 15:17:35 +01:00
Stefan Brüns d64be25be4 scpi: Do not block when reading header of definite length blocks
When using SCPI over serial (over USB), we want the header without waiting
for the terminating newline, as otherwise the transfer may time out.
sr_scpi_get_data() will block until the message is complete.
2017-01-21 15:08:21 +01:00
Stefan Brüns 9ea4018f2f scpi_serial: Get rid of intermediate buffer, do not strip newline
Lowlevel access functions should not alter the data. sr_scpi_get_string(),
which is called by most highlevel access functions, strips newlines
in a central place, and is only fed with data which contains newlines
as a final terminator.
IEEE 488.2 definite length blocks may contain arbitrary data, thus the
payload up to the provided length should be passed unaltered.

Track if the last received character is a newline, which can be used
by sr_scpi_get_string() and its callers to determine if the response
is complete.
2017-01-21 15:08:21 +01:00
Stefan Brüns 37ef582d08 scpi: Query current time just once, use microseconds for timeout
g_get_monotonic_time() returns current time in microseconds, use the same
granularity for storing the read timeout.
There is also no need to check the timeout if data has just been read.
2017-01-21 15:08:21 +01:00
Stefan Brüns 59b9c3290a yokogawa-dlm: Mostly fix dumping of current timebase
sr_period_string takes the frequency as its argument, i.e. the reciprocal
of the timebase. Obviously this will not work for frequencies less than
1Hz / timebases greater than 1 second, but at least is correct for all
other available timebases.
2017-01-21 15:08:21 +01:00
Stefan Brüns d8b65ef661 hameg_hmo: Mostly fix dumping of current timebase
sr_period_string takes the frequency as its argument, i.e. the reciprocal
of the timebase. Obviously this will not work for frequencies less than
1Hz / timebases greater than 1 second, but at least is correct for all
other available timebases.
2017-01-21 15:08:21 +01:00
Stefan Brüns 5223412ebe tests/strutil: Check output of sr_period_string 2017-01-21 15:08:21 +01:00
Stefan Brüns a547531bf1 strutil: Fix sr_period_string output
The output was wrong for all frequencies but 1 Hz, 1 kHz, 1 MHz and 1 GHz.
With this changes, the output may still be off due to rounding, but will
be correct as to the shown accuracy.
2017-01-20 19:48:39 +01:00
Gerhard Sittig 900846816f scpi: Don't process received data of zero length
When nothing was received in a read attempt, we need not adjust the
buffered data's read position nor the glib string object's size. Skip
any processing for empty input, just keep checking for timeouts.
2017-01-20 18:53:43 +01:00
Gerhard Sittig ad21865fa7 scpi: Rephrase buffer resize for free space during SCPI read, add comments
Routine sr_scpi_get_data() checks for free space in the receive buffer,
and resizes the buffer when free space drops below a threshold. The
previous logic assumed that the resize and the read logic would interact
in some specific way to achieve the desired operation.

Adjust the buffer resize such that more free space is pre-allocated, yet
the payload size of the buffer is not affected. This eliminates the
dependency of the optional resize logic from subsequent activity for
reception of data that is non-optional.

Add comments while we are here, outline the steps taken in the
sr_scpi_get_data() routine.
2017-01-20 18:53:43 +01:00
Gerhard Sittig 4889acefb2 hameg-hmo: Rephrase the channel constraints check (analog vs digital)
Phrase the logic which checks the use of analog channels and digital
pods in more generic terms. Place a comment about the contraints' being
potentially dependent on the specific HMO model. This implementation
should lend itself better to future adjustment (HMO1002?).
2017-01-20 18:53:43 +01:00
Gerhard Sittig e06875b2ce hameg-hmo: Map logic data from second digital pod to channels D8-D15
An internal libsigrok implementation detail prevents partial submission
of logic data for different channel groups in multiple calls. Instead
one logic packet needs to be sent in a single call, which combines data
for all channels.

Introduce a logic data storage which folds samples from several channel
groups that were received at different points in time into a combined
memory layout of larger unitsize. Stick with the former shortcut of
passing on the input bytes directly when only the first digital pod is
used during acquisition.

This change correctly maps data from the second pod to channels D8-D15.
2017-01-20 18:53:43 +01:00
Gerhard Sittig 1b0f62df22 hameg-hmo: Do read from second digital pod during acquisition
The previous implementation only added one of the digital channels to
the list of enabled channels that are involved in the acquisition (the
first one that was found). This means that when the set of used digital
channels spans more than one pod/group, the second pod will never be
read from.

Make sure to enable one digital channel per pod/group, such that
acquisition will retrieve data from all involved input sources.

Add comments while we are here. Mention how the different setup, check,
start, and receive routines which are spread across several files do
interact to achieve acquisition.
2017-01-07 21:36:53 +01:00
Gerhard Sittig b23eb1d4d1 hameg-hmo: Send exactly one sigrok frame per scope frame
The previous implementation used to put FRAME_BEGIN and FRAME_END
markers around each received chunk of samples, while those chunks
correspond to a single channel (analog) or a group of eight channels
(digital) each. In other words, the hameg-hmo driver had provided a
multiple of the requested frames, and those frames were incomplete.

Make sure to only send FRAME_BEGIN before the first channel's data,
and FRAME_END after the last channel's data of a frame. Thus make
sigrok frames exactly match the scope's frames.

Add some comments on the frame marker and the acquisition stop logic
while we are here.
2017-01-07 21:36:53 +01:00
Gerhard Sittig 65a6794ea1 hameg-hmo: Use the host's endianess to read analog channel data via SCPI
Configure the scope to the host's native endianess before downloading
acquisition data from analog channels. This unbreaks operation on those
models which default to a representation which differs from the host.
2017-01-07 21:36:53 +01:00
Gerhard Sittig d1ad8b10bc Revert "hameg-hmo: Support BE format for SCPI sample downloads"
Undo the change which queries the scope's endianess and has the floats
converted after reception. An alternative implementation will perform
better.
2017-01-07 21:36:52 +01:00
Gerhard Sittig d5a61aaf2d Revert "scpi: Don't process received data of zero length"
Undo the change which skips management activities when no data was
received. This change breaks the current implementation, and needs to
get deferred until a delicate interaction between the resize and the
read logic has been eliminated.
2017-01-07 21:36:52 +01:00
Gerhard Sittig 2ea1fdf121 license: remove FSF postal address from boiler plate license text
Remove the FSF postal address as it might change (it did in the past).
Reference the gnu.org website instead which is more stable.
2017-01-07 16:05:39 +01:00