]> sigrok.org Git - libsigrok.git/log
libsigrok.git
10 years agosysclk-lwla: Add support for external trigger input.
Daniel Elstner [Sun, 26 Jan 2014 20:42:22 +0000 (21:42 +0100)]
sysclk-lwla: Add support for external trigger input.

Implement the configuration setting TRIGGER_SOURCE with the
choices CH (logic channels) and TRG (external trigger input).
Also implement the TRIGGER_SLOPE setting for selecting the
edge to trigger on (rising or falling).

10 years agosysclk-lwla: Simplify and optimize word extraction.
Daniel Elstner [Sun, 26 Jan 2014 19:28:59 +0000 (20:28 +0100)]
sysclk-lwla: Simplify and optimize word extraction.

It turns out that all LWLA protocol responses consist either
of 32-bit units or of 32-bit units combined into 64-bit units.
Thus it makes sense to double the basic unit size for reading
from 16 bit to 32 bit.
We cannot do the same for command messages though, as those
actually do use 16-bit quantities in some places, and 32-bit
arguments are not always aligned to 32-bit boundaries.

(acquisition_state.xfer_buf_in): Change unit type to uint32_t,
and update related macros and code accordingly.
(LWLA_TO_UINT32): New macro to replace LWLA_READ32, operating
directly on 32-bit values instead of pointers to 16-bit units.
Make use of a compiler-recognized idiom for bitwise rotation
to efficiently swap the 16-bit halves of a 32-bit word.
(LWLA_TO_UINT16): New macro to replace LWLA_READ16.
(LWLA_READ64): Remove unused macro.
(LWLA_WORD_[0123]): Slightly simplify 16-bit word extraction.

10 years agosysclk-lwla: Limit use of SR_ERR_ARG to user-supplied arguments.
Daniel Elstner [Sat, 25 Jan 2014 22:27:40 +0000 (23:27 +0100)]
sysclk-lwla: Limit use of SR_ERR_ARG to user-supplied arguments.

The return code SR_ERR_ARG is intended for reporting unsupported
or inapplicable device configuration settings and is not a hard
error.  In order to indicate failure of internal sanity checks,
use SR_ERR_BUG instead.

10 years agoscpi: Limit the log message in get_string() to 70 characters.
poljar (Damir Jelić) [Tue, 28 Jan 2014 16:13:00 +0000 (17:13 +0100)]
scpi: Limit the log message in get_string() to 70 characters.

10 years agodemo: Cast to double while calculating the pattern frequency.
poljar (Damir Jelić) [Sun, 26 Jan 2014 20:30:57 +0000 (21:30 +0100)]
demo: Cast to double while calculating the pattern frequency.

Without the cast non integer frequencies weren't possible (e.g. with a sampling
frequency of 50Hz we would end up with a signal frequency of 2Hz instead of
2.5Hz). The result were signals which had an incorrect number of samples per
period.

BugLink: http://sigrok.org/bugzilla/show_bug.cgi?id=297
10 years agorigol-ds: Deal with dev_close() getting called multiple times.
Bert Vermeulen [Mon, 27 Jan 2014 20:19:41 +0000 (21:19 +0100)]
rigol-ds: Deal with dev_close() getting called multiple times.

10 years agohwdriver: Change TRIGGER_SLOPE setting to string type.
Daniel Elstner [Sun, 26 Jan 2014 23:22:01 +0000 (00:22 +0100)]
hwdriver: Change TRIGGER_SLOPE setting to string type.

Drivers interpreted the uint64 values to the SR_CONF_TRIGGER_SLOPE
configuration setting in different ways.  In order to orthogonalize
the API, change the type of the setting to a string with the same
format as uses for logic probes.

10 years agodemo: Require sample limit.
Bert Vermeulen [Sat, 25 Jan 2014 20:20:29 +0000 (21:20 +0100)]
demo: Require sample limit.

10 years agosysclk-lwla: Load bitstream files in RBF format.
Daniel Elstner [Sat, 25 Jan 2014 01:21:19 +0000 (02:21 +0100)]
sysclk-lwla: Load bitstream files in RBF format.

Modify the bitstream loading routine to work directly with the
Raw Binary Files (.rbf) generated by Altera tools.  Previously,
a custom format was used which was basically an RBF preceded by
a 4-byte header specifying the transfer length.

10 years agodemo: Keep separate counters for logic and analog sources.
Bert Vermeulen [Sat, 25 Jan 2014 19:39:50 +0000 (20:39 +0100)]
demo: Keep separate counters for logic and analog sources.

Since they have different internal buffer sizes, their output counters
are not in sync. See bug 295.

10 years agoProperly publish samplerate when loading session file.
Bert Vermeulen [Sat, 25 Jan 2014 11:44:00 +0000 (12:44 +0100)]
Properly publish samplerate when loading session file.

10 years agosr file format: Bump version to 2.
Uwe Hermann [Thu, 23 Jan 2014 21:45:08 +0000 (22:45 +0100)]
sr file format: Bump version to 2.

The *.sr (libsigrok session) file format has changed since the last
libsigrok release. Frontends using older libsigrok versions will not
be able to read *.sr files created by frontends using the new file format.

Thus, bump the version number of the file format to 2.

Current libsigrok will read both version 1 and version 2 files
correctly, and always write version 2 files.

10 years agorigol-ds: Fix a couple of compile warnings.
Martin Ling [Thu, 23 Jan 2014 10:13:54 +0000 (10:13 +0000)]
rigol-ds: Fix a couple of compile warnings.

10 years agooutput/csv: Drop last separators as needed.
Bert Vermeulen [Thu, 23 Jan 2014 22:11:34 +0000 (23:11 +0100)]
output/csv: Drop last separators as needed.

10 years agosysclk-lwla: Implement config_commit() callback.
Daniel Elstner [Thu, 23 Jan 2014 01:35:51 +0000 (02:35 +0100)]
sysclk-lwla: Implement config_commit() callback.

Move pre-acquisition hardware setup to the new config_commit()
callback.  At the moment, the only setting applied at commit
time is switching the clock source, which involves uploading
a new bitstream to the FPGA.

10 years agosysclk-lwla: Implement config_probe_set() callback.
Daniel Elstner [Thu, 23 Jan 2014 01:27:58 +0000 (02:27 +0100)]
sysclk-lwla: Implement config_probe_set() callback.

Move setup of channels and trigger masks to the new probe
configuration callback.  Although the actual hardware setup
still happens just before acquisition, the new approach
already has the advantage that invalid settings are caught
early.
Also, it turns out that the LWLA1034 allows triggering on
channels which are not enabled for data acquisition.  This
feature is now supported as well.

10 years agosysclk-lwla: Do not reset drv_context.instances on scan.
Daniel Elstner [Thu, 23 Jan 2014 00:24:29 +0000 (01:24 +0100)]
sysclk-lwla: Do not reset drv_context.instances on scan.

Apparently, frontends may call scan() more than once to accumulate
multiple devices, so do not reset the instance list pointer at the
start of each scan.  Also, number devices continuously across scans.

10 years agosysclk-lwla: Advertise SR_CONF_CONN option.
Daniel Elstner [Thu, 23 Jan 2014 00:10:31 +0000 (01:10 +0100)]
sysclk-lwla: Advertise SR_CONF_CONN option.

10 years agorigol-ds: Don't run rigol_ds_block_wait() code unless supported.
Martin Ling [Wed, 22 Jan 2014 08:15:12 +0000 (08:15 +0000)]
rigol-ds: Don't run rigol_ds_block_wait() code unless supported.

10 years agorigol-ds: Fix partial read handling in header parser.
Martin Ling [Wed, 22 Jan 2014 08:13:27 +0000 (08:13 +0000)]
rigol-ds: Fix partial read handling in header parser.

10 years agoscpi_serial: Reimplement to allow scpi_read_complete() to work correctly.
Martin Ling [Wed, 22 Jan 2014 07:41:34 +0000 (07:41 +0000)]
scpi_serial: Reimplement to allow scpi_read_complete() to work correctly.

10 years agorigol-ds: Fix divide by zero when no analog probes selected.
Martin Ling [Wed, 22 Jan 2014 05:07:20 +0000 (05:07 +0000)]
rigol-ds: Fix divide by zero when no analog probes selected.

10 years agorigol-ds: Stop capture cleanly on read errors.
Martin Ling [Wed, 22 Jan 2014 04:57:48 +0000 (04:57 +0000)]
rigol-ds: Stop capture cleanly on read errors.

10 years agorigol-ds: Improve protocol debugging output, abort on read errors.
Martin Ling [Wed, 22 Jan 2014 04:50:38 +0000 (04:50 +0000)]
rigol-ds: Improve protocol debugging output, abort on read errors.

10 years agorigol-ds: Only protocol v3 adds trailing linefeeds to data blocks.
Martin Ling [Wed, 22 Jan 2014 04:49:57 +0000 (04:49 +0000)]
rigol-ds: Only protocol v3 adds trailing linefeeds to data blocks.

10 years agoscpi_usbtmc: Improve debugging output.
Martin Ling [Wed, 22 Jan 2014 04:48:33 +0000 (04:48 +0000)]
scpi_usbtmc: Improve debugging output.

10 years agorigol-ds: Overhaul vendor/series/model info and protocol variants.
Martin Ling [Wed, 22 Jan 2014 04:08:00 +0000 (04:08 +0000)]
rigol-ds: Overhaul vendor/series/model info and protocol variants.

10 years agorigol-ds: Overhaul VS5000 and DS1000 support.
Martin Ling [Wed, 22 Jan 2014 00:25:32 +0000 (00:25 +0000)]
rigol-ds: Overhaul VS5000 and DS1000 support.

This change moves the handling of series differences out to the points in the
code where they actually matter, unifying the overall structure of the code.

It also adds new VS5000/DS1000 series equivalents for commands that were
previously only implemented on the later models.

After this change, trigger waiting and the 'Memory' data source are supported
on the VS5000/DS1000 series.

10 years agorigol-ds: Use common rigol_ds_config_set() function throughout.
Martin Ling [Wed, 22 Jan 2014 00:22:41 +0000 (00:22 +0000)]
rigol-ds: Use common rigol_ds_config_set() function throughout.

10 years agoscpi: Log responses received by sr_scpi_get_string().
Martin Ling [Wed, 22 Jan 2014 00:14:42 +0000 (00:14 +0000)]
scpi: Log responses received by sr_scpi_get_string().

10 years agools: Don't reduce sample count just because it's not a multiple of 4.
Bert Vermeulen [Thu, 23 Jan 2014 00:09:16 +0000 (01:09 +0100)]
ols: Don't reduce sample count just because it's not a multiple of 4.

10 years agooutput/csv: Drop extra separator on every line.
Bert Vermeulen [Wed, 22 Jan 2014 01:44:52 +0000 (02:44 +0100)]
output/csv: Drop extra separator on every line.

10 years agooutput/csv: Get rid of 64-probe limit.
Bert Vermeulen [Wed, 22 Jan 2014 01:34:56 +0000 (02:34 +0100)]
output/csv: Get rid of 64-probe limit.

10 years agooutput/csv: Use new output API.
Bert Vermeulen [Wed, 22 Jan 2014 00:14:26 +0000 (01:14 +0100)]
output/csv: Use new output API.

10 years agodemo: Cycle through all available patterns for default analog probes.
Bert Vermeulen [Tue, 21 Jan 2014 17:25:50 +0000 (18:25 +0100)]
demo: Cycle through all available patterns for default analog probes.

10 years agodemo: Probe indexes should be unique, even if the types are different.
Bert Vermeulen [Tue, 21 Jan 2014 17:19:57 +0000 (18:19 +0100)]
demo: Probe indexes should be unique, even if the types are different.

10 years agoDon't mention non-logic probes in session file metadata.
Bert Vermeulen [Tue, 21 Jan 2014 17:16:52 +0000 (18:16 +0100)]
Don't mention non-logic probes in session file metadata.

They don't get saved anyway, and are very confusing to clients.

10 years agorigol-ds: Disable key lock when closing device.
Martin Ling [Tue, 21 Jan 2014 16:51:01 +0000 (16:51 +0000)]
rigol-ds: Disable key lock when closing device.

10 years agobrymen-dmm: Make protocol parser locale-independent.
Bert Vermeulen [Tue, 21 Jan 2014 16:02:27 +0000 (17:02 +0100)]
brymen-dmm: Make protocol parser locale-independent.

10 years agoagilent-dmm: Make protocol parser locale-independent.
Bert Vermeulen [Tue, 21 Jan 2014 15:43:49 +0000 (16:43 +0100)]
agilent-dmm: Make protocol parser locale-independent.

10 years agofluke-dmm: Make protocol parsers locale-independent.
Bert Vermeulen [Tue, 21 Jan 2014 15:33:34 +0000 (16:33 +0100)]
fluke-dmm: Make protocol parsers locale-independent.

10 years agoMake sure to delete temporary metadata file after use.
Bert Vermeulen [Tue, 21 Jan 2014 13:47:05 +0000 (14:47 +0100)]
Make sure to delete temporary metadata file after use.

Fixes bug 276.

10 years agostd: Fix caller prefix output.
Bert Vermeulen [Tue, 21 Jan 2014 13:03:27 +0000 (14:03 +0100)]
std: Fix caller prefix output.

10 years agorigol-ds: DS1000 series still needs the stupid delay.
Martin Ling [Tue, 21 Jan 2014 02:23:38 +0000 (02:23 +0000)]
rigol-ds: DS1000 series still needs the stupid delay.

10 years agosession: Auto-commit settings before acquisition.
Daniel Elstner [Mon, 20 Jan 2014 22:04:49 +0000 (23:04 +0100)]
session: Auto-commit settings before acquisition.

(sr_session_start): Just before starting acquisition on
a device, call sr_config_commit() to apply pending config
changes to the hardware device.
(sr_session_dev_add): Ditto.  Also, return an error code
if starting acquisition failed.

10 years agorigol-ds: On DS1000 with firmware < 0.2.4, use legacy protocol.
Bert Vermeulen [Tue, 21 Jan 2014 11:54:24 +0000 (12:54 +0100)]
rigol-ds: On DS1000 with firmware < 0.2.4, use legacy protocol.

Apparently the ASCII header containing length was only added in version
0.2.4.

10 years agorigol-ds: Shorten vendor name.
Bert Vermeulen [Mon, 20 Jan 2014 18:08:10 +0000 (19:08 +0100)]
rigol-ds: Shorten vendor name.

10 years agoagilent-dmm: Shorten vendor name.
Bert Vermeulen [Mon, 20 Jan 2014 18:07:48 +0000 (19:07 +0100)]
agilent-dmm: Shorten vendor name.

10 years agools: Add option to turn test patterns off again.
Bert Vermeulen [Mon, 20 Jan 2014 17:16:25 +0000 (18:16 +0100)]
ols: Add option to turn test patterns off again.

10 years agohwdriver: Introduce sr_config_commit() API call.
Daniel Elstner [Sun, 19 Jan 2014 19:39:11 +0000 (20:39 +0100)]
hwdriver: Introduce sr_config_commit() API call.

(sr_dev_driver.config_probe_set): New optional callback enabling
drivers to be notified upon changes to probe settings.
(sr_dev_probe_enable, sr_dev_trigger_set): Invoke new driver
callback on changes.
(sr_dev_driver.config_commit): New optional callback allowing
drivers to defer application of configuration settings until
an explicit call to config_commit().
(sr_config_commit): New public wrapper function.

10 years agorigol-ds: add support for more keys in config_get()
Aurelien Jacobs [Sun, 19 Jan 2014 22:28:40 +0000 (23:28 +0100)]
rigol-ds: add support for more keys in config_get()

10 years agorigol-ds: use appropriately defined NUM_VDIV constant
Aurelien Jacobs [Sun, 19 Jan 2014 22:26:26 +0000 (23:26 +0100)]
rigol-ds: use appropriately defined NUM_VDIV constant

10 years agorigol-ds: add more valid timebases for DS2302
Aurelien Jacobs [Sun, 19 Jan 2014 22:24:58 +0000 (23:24 +0100)]
rigol-ds: add more valid timebases for DS2302

10 years agorigol-ds: fix set_cfg() calls with float parameters to avoid locale issues
Aurelien Jacobs [Sun, 19 Jan 2014 13:46:59 +0000 (14:46 +0100)]
rigol-ds: fix set_cfg() calls with float parameters to avoid locale issues

10 years agorigol-ds: Send FRAME_BEGIN and FRAME_END per frame, not per channel.
Martin Ling [Fri, 17 Jan 2014 15:07:15 +0000 (15:07 +0000)]
rigol-ds: Send FRAME_BEGIN and FRAME_END per frame, not per channel.

10 years agorigol-ds: Cleanup and fix check for short data blocks.
Martin Ling [Fri, 17 Jan 2014 14:46:10 +0000 (14:46 +0000)]
rigol-ds: Cleanup and fix check for short data blocks.

10 years agorigol-ds: Use *OPC? command rather than delay to await completion.
Martin Ling [Fri, 17 Jan 2014 14:22:09 +0000 (14:22 +0000)]
rigol-ds: Use *OPC? command rather than delay to await completion.

10 years agoscpi: Remove redundant newline removal in sr_scpi_get_hw_id().
Martin Ling [Fri, 17 Jan 2014 14:17:50 +0000 (14:17 +0000)]
scpi: Remove redundant newline removal in sr_scpi_get_hw_id().

10 years agorigol-ds: Use standard sr_scpi_get functions, remove internal versions.
Martin Ling [Fri, 17 Jan 2014 14:10:36 +0000 (14:10 +0000)]
rigol-ds: Use standard sr_scpi_get functions, remove internal versions.

10 years agoscpi: Strip trailing newlines in sr_scpi_get_string().
Martin Ling [Fri, 17 Jan 2014 13:43:34 +0000 (13:43 +0000)]
scpi: Strip trailing newlines in sr_scpi_get_string().

10 years agorigol-ds: DS1000 series actually use IEEE488.2 data block format.
Martin Ling [Fri, 17 Jan 2014 02:56:45 +0000 (02:56 +0000)]
rigol-ds: DS1000 series actually use IEEE488.2 data block format.

10 years agorigol-ds: Correct digital waveform block sizes.
Martin Ling [Fri, 17 Jan 2014 02:56:01 +0000 (02:56 +0000)]
rigol-ds: Correct digital waveform block sizes.

10 years agorigol-ds: Check SCPI read is complete after reading expected block length.
Martin Ling [Fri, 17 Jan 2014 02:27:29 +0000 (02:27 +0000)]
rigol-ds: Check SCPI read is complete after reading expected block length.

10 years agorigol-ds: Update which channels are enabled after making changes.
Martin Ling [Fri, 17 Jan 2014 00:46:16 +0000 (00:46 +0000)]
rigol-ds: Update which channels are enabled after making changes.

10 years agoRemove SR_CONF_MAX_UNCOMPRESSED_SAMPLES again.
Bert Vermeulen [Sun, 19 Jan 2014 16:18:59 +0000 (17:18 +0100)]
Remove SR_CONF_MAX_UNCOMPRESSED_SAMPLES again.

The maximum sample size that can be set on a device is now published
by sr_config_list(SR_CONF_LIMIT_SAMPLES). This returns a tuple of
uint64_t representing minimum and maximum number of samples.

10 years agosysclk-lwla: Improve message log output.
Daniel Elstner [Sat, 18 Jan 2014 17:13:40 +0000 (18:13 +0100)]
sysclk-lwla: Improve message log output.

Report settings at acquisition start as informational messages.
Print a message when the the trigger condition has been met.
Demote some other messages from information to debug, and use
the %zu format for printing size_t values.

10 years agosysclk-lwla: Streamline packet output logic.
Daniel Elstner [Sat, 18 Jan 2014 16:36:23 +0000 (17:36 +0100)]
sysclk-lwla: Streamline packet output logic.

(process_sample_data): When expanding run-length samples into
session packets, calculate the number of samples to write in
advance while honoring all constraints.  This is cleaner than
checking constraints within the expansion loop.  Also, the new
logic always fills up packets exactly to whatever limit applies
first, thereby removing the need for truncation after the fact.

10 years agosysclk-lwla: Implement SR_CONF_LIMIT_MSEC.
Daniel Elstner [Sat, 18 Jan 2014 15:08:39 +0000 (16:08 +0100)]
sysclk-lwla: Implement SR_CONF_LIMIT_MSEC.

Allow the acquisition to be constrained by time in addition to
a sample count limit.  Since the LWLA protocol actually provides
only a duration natively, implement the sample count limit on top
of the new duration limit.

With this change, limiting an acquisition in external clock mode
should finally work properly.

10 years agotests: Fix a few warnings.
Uwe Hermann [Fri, 17 Jan 2014 19:41:56 +0000 (20:41 +0100)]
tests: Fix a few warnings.

Fix a bunch of "no previous prototype for ..." warnings exposed
by -Wmissing-prototypes.

10 years agodemo: Bring analog square wave amplitude into line with other patterns.
Bert Vermeulen [Wed, 15 Jan 2014 00:51:04 +0000 (01:51 +0100)]
demo: Bring analog square wave amplitude into line with other patterns.

10 years agodemo: Add analog sawtooth pattern.
poljar (Damir Jelić) [Tue, 14 Jan 2014 22:03:10 +0000 (23:03 +0100)]
demo: Add analog sawtooth pattern.

10 years agodemo: Add triangle pattern.
poljar (Damir Jelić) [Tue, 14 Jan 2014 22:03:09 +0000 (23:03 +0100)]
demo: Add triangle pattern.

10 years agodemo: Implement sine wave pattern.
poljar (Damir Jelić) [Tue, 14 Jan 2014 22:03:08 +0000 (23:03 +0100)]
demo: Implement sine wave pattern.

This adds sine wave generation capabilities for the analog channels in the demo
driver. The frequency of the sine wave depends on the configured sample rate of
the demo device. The frequency of the sine wave is always 20 times smaller than
the sample rate, in other words we always have 20 samples per period.

10 years agouni-t-ut32x: Fix typo that prevents usage with multiple devices.
Bert Vermeulen [Fri, 17 Jan 2014 11:11:52 +0000 (12:11 +0100)]
uni-t-ut32x: Fix typo that prevents usage with multiple devices.

10 years agorigol-ds: Minor whitespace fixes.
Uwe Hermann [Fri, 17 Jan 2014 00:57:09 +0000 (01:57 +0100)]
rigol-ds: Minor whitespace fixes.

10 years agorigol-ds: Enable/disable LA pod when (de)selecting digital channels.
Martin Ling [Thu, 16 Jan 2014 23:25:59 +0000 (23:25 +0000)]
rigol-ds: Enable/disable LA pod when (de)selecting digital channels.

10 years agorigol-ds: Reset num_frames to zero in dev_acquisition_start.
Martin Ling [Thu, 16 Jan 2014 18:57:45 +0000 (18:57 +0000)]
rigol-ds: Reset num_frames to zero in dev_acquisition_start.

10 years agorigol-ds: Make sure to always send SR_DF_END at end of capture.
Martin Ling [Wed, 15 Jan 2014 17:06:46 +0000 (17:06 +0000)]
rigol-ds: Make sure to always send SR_DF_END at end of capture.

10 years agorigol-ds: Calculate effective samplerate.
Martin Ling [Tue, 14 Jan 2014 21:27:58 +0000 (21:27 +0000)]
rigol-ds: Calculate effective samplerate.

10 years agorigol-ds: Separate function to compute analog frame size.
Martin Ling [Tue, 14 Jan 2014 21:21:31 +0000 (21:21 +0000)]
rigol-ds: Separate function to compute analog frame size.

10 years agorigol-ds: Advertise SR_CONF_LIMIT_FRAMES support.
Martin Ling [Tue, 14 Jan 2014 20:55:20 +0000 (20:55 +0000)]
rigol-ds: Advertise SR_CONF_LIMIT_FRAMES support.

10 years agorigol-ds: Fix check for probe group validity.
Martin Ling [Tue, 14 Jan 2014 20:48:17 +0000 (20:48 +0000)]
rigol-ds: Fix check for probe group validity.

10 years agohameg-hmo: Fix two compiler warnings on Windows.
Uwe Hermann [Thu, 16 Jan 2014 23:37:58 +0000 (00:37 +0100)]
hameg-hmo: Fix two compiler warnings on Windows.

  CC       libsigrok_hw_hameg_hmo_la-protocol.lo
api.c: In function 'auto_find_usb':
api.c:70:39: warning: unused parameter 'vendor_id' [-Wunused-parameter]
 static GSList *auto_find_usb(uint16_t vendor_id, uint16_t product_id)
                                       ^
api.c:70:59: warning: unused parameter 'product_id' [-Wunused-parameter]
 static GSList *auto_find_usb(uint16_t vendor_id, uint16_t product_id)
                                                           ^

10 years agousb: Fix two compiler warnings on Windows.
Uwe Hermann [Thu, 16 Jan 2014 23:26:30 +0000 (00:26 +0100)]
usb: Fix two compiler warnings on Windows.

  CC       libsigrok_hw_common_la-usb.lo
usb.c:241:18: warning: no previous prototype for 'usb_thread'
[-Wmissing-prototypes]
 SR_PRIV gpointer usb_thread(gpointer data)
                  ^
usb.c:256:13: warning: no previous prototype for 'usb_callback'
[-Wmissing-prototypes]
 SR_PRIV int usb_callback(int fd, int revents, void *cb_data)
             ^

10 years agohameg-hmo: Silence warning about format security.
poljar (Damir Jelić) [Thu, 16 Jan 2014 18:42:27 +0000 (19:42 +0100)]
hameg-hmo: Silence warning about format security.

The command for fetching the sample rate while in single shot mode doesn't take
an argument so the snprintf here is redundant.

10 years agohameg-hmo: Reset the number of acquired frames in acquisition stop.
poljar (Damir Jelić) [Thu, 16 Jan 2014 18:55:00 +0000 (19:55 +0100)]
hameg-hmo: Reset the number of acquired frames in acquisition stop.

10 years agohameg-hmo: Expose more options with config_get().
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:58 +0000 (15:28 +0100)]
hameg-hmo: Expose more options with config_get().

This patch exposes the TRIGGER_SOURCE and COUPLING options via config_get().

10 years agohameg-hmo: Advertise the frame limit option.
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:57 +0000 (15:28 +0100)]
hameg-hmo: Advertise the frame limit option.

10 years agohameg-hmo: Update the sample rate when the channel states or the timebase change.
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:56 +0000 (15:28 +0100)]
hameg-hmo: Update the sample rate when the channel states or the timebase change.

The sample rate on the Hameg scopes changes depending on the number of channels
turned on and on the current timebase.

Update the sample rate if any of the above change.

10 years agohameg-hmo: Add support for sample rate fetching.
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:55 +0000 (15:28 +0100)]
hameg-hmo: Add support for sample rate fetching.

10 years agoscpi: Add CMD_GET_SAMPLE_RATE to the command enum.
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:54 +0000 (15:28 +0100)]
scpi: Add CMD_GET_SAMPLE_RATE to the command enum.

10 years agohameg-hmo: Change the way vdiv and timebase are saved.
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:53 +0000 (15:28 +0100)]
hameg-hmo: Change the way vdiv and timebase are saved.

The current vertical division setting (per channel) and the timebase are stored
as a floating point number. This is suboptimal since clients expect us to send
this information to them in form of a rational number.

Store only the index of the current setting since all the supported settings are
already stored inside of an array.

10 years agohameg-hmo: Send the DF_END packet in acquisition_stop()
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:52 +0000 (15:28 +0100)]
hameg-hmo: Send the DF_END packet in acquisition_stop()

The DF_END packet was send out after all configured frames were fetched, but
devices may stop the acquisition at any point in time and an DF_END will not be
send out in this case.

Send the DF_END packet inside of acquisition_stop() so this can't happen.

10 years agohameg-hmo: Close the device after initial scan.
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:51 +0000 (15:28 +0100)]
hameg-hmo: Close the device after initial scan.

The device is after a scan left open and clients that don't call unconditionally
dev_open() will never fetch the initial device state.

Close the device after the scan so clients know they need to open it.

10 years agohameg-hmo: Handle floating point numbers while ignoring the locale.
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:50 +0000 (15:28 +0100)]
hameg-hmo: Handle floating point numbers while ignoring the locale.

10 years agoscpi: Use sr_atof_ascii() instead of sr_atof().
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:49 +0000 (15:28 +0100)]
scpi: Use sr_atof_ascii() instead of sr_atof().

10 years agostrutil: Add function to parse floating point numbers while ignoring the locale.
poljar (Damir Jelić) [Thu, 16 Jan 2014 14:28:48 +0000 (15:28 +0100)]
strutil: Add function to parse floating point numbers while ignoring the locale.

Most of the supported gear uses the ANSI C locale for communication, and if the
client sets up an incompatible locale parsing would fail.

This function ignores the client's locale and parses floating point numbers
using the ANSI C locale. This function should be always used when parsing
floating point numbers coming from the instrument.

10 years agodevice: Pass sdi as an function argument to config_list in dev_has_option()
poljar (Damir Jelić) [Thu, 16 Jan 2014 01:53:41 +0000 (02:53 +0100)]
device: Pass sdi as an function argument to config_list in dev_has_option()

With drivers that support multiple devices we need to know the device model
while listing options. That information is most of the time saved in the private
part of the dev_inst structure.

Pass the pointer to the dev_inst structure as an function argument so we have
access to this information.

10 years agostrutil: Correctly parse floating point frequencies in parse_size_string().
poljar (Damir Jelić) [Thu, 16 Jan 2014 01:53:40 +0000 (02:53 +0100)]
strutil: Correctly parse floating point frequencies in parse_size_string().

parse_size_string() incorrectly parses a real number, e.g. 1.5 kHz ends up
being 1Hz.

This patch fixes parse_size_string() to take the fractional part as well into
account. The fractional part is parsed as an double precision floating point
number while ignoring the locale.

10 years agosysclk-lwla: Make use of the probe index again.
Daniel Elstner [Wed, 15 Jan 2014 10:09:06 +0000 (11:09 +0100)]
sysclk-lwla: Make use of the probe index again.

(configure_probes): sr_probe::index has been un-deprecated,
so use it instead of relying on the list order.