]> sigrok.org Git - libsigrok.git/log
libsigrok.git
11 years agotekpower-dmm: Drop unneeded g_try_malloc().
Uwe Hermann [Wed, 28 Nov 2012 16:14:42 +0000 (17:14 +0100)]
tekpower-dmm: Drop unneeded g_try_malloc().

11 years agoserial: Don't hardcode parity and stop bits on Windows.
Uwe Hermann [Sun, 2 Dec 2012 13:10:27 +0000 (14:10 +0100)]
serial: Don't hardcode parity and stop bits on Windows.

11 years agoserial: Full baudrate support on Windows/MinGW.
Uwe Hermann [Sun, 2 Dec 2012 12:56:13 +0000 (13:56 +0100)]
serial: Full baudrate support on Windows/MinGW.

11 years agoserial: RTS/DTR support on Windows/MinGW.
Uwe Hermann [Sun, 2 Dec 2012 12:41:49 +0000 (13:41 +0100)]
serial: RTS/DTR support on Windows/MinGW.

11 years agoserial: Use OS-independent flags for serial port opening.
Uwe Hermann [Sun, 2 Dec 2012 11:45:54 +0000 (12:45 +0100)]
serial: Use OS-independent flags for serial port opening.

Add SERIAL_RDWR, SERIAL_RDONLY, and SERIAL_NONBLOCK (for now), which are
mapped to the respective OS-specific mechanism in serial_open().

11 years agoserial: Fix Windows build.
Uwe Hermann [Sat, 1 Dec 2012 21:34:53 +0000 (22:34 +0100)]
serial: Fix Windows build.

11 years agodemo: Properly stop acquisition after reaching our sample quota
Alexandru Gagniuc [Sat, 1 Dec 2012 18:49:15 +0000 (12:49 -0600)]
demo: Properly stop acquisition after reaching our sample quota

The demo driver was using sr_session_source_add_channel() to add
a poll source, but was relying on sr_session_run_poll() to call
sr_session_source_remove(). This, coupled with the design of the
driver caused errors once the samples were collected.

The error stream was most likely related to failing to properly close
one of the channels.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agodemo: Be more verbose about starting/stopping acquisition
Alexandru Gagniuc [Sat, 1 Dec 2012 18:03:45 +0000 (12:03 -0600)]
demo: Be more verbose about starting/stopping acquisition

This is the first step in fixing the demo driver: figuring out what is
being called and what is not _and_ have it show up in the logs.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial: allow for extra rts and dtr options in conn string
Bert Vermeulen [Mon, 26 Nov 2012 23:50:51 +0000 (00:50 +0100)]
serial: allow for extra rts and dtr options in conn string

Options in addition to the usual "9600/8n1" syntax start with a
slash, and take the form of key=value, where different options are
also separated by slashes. For example:

"9600/8n1/rts=0/dtr=1"

This sets RTS low and DTR high.

11 years agoserial: Initial code for setting DTR/RTS.
Uwe Hermann [Mon, 26 Nov 2012 16:01:15 +0000 (17:01 +0100)]
serial: Initial code for setting DTR/RTS.

Currently disabled until option parsing is in place.

11 years agoAdd compress option to input/vcd.
Petteri Aimonen [Thu, 22 Nov 2012 21:15:27 +0000 (23:15 +0200)]
Add compress option to input/vcd.

11 years agoradioshack-dmm: Be more verbose with packet checks
Alexandru Gagniuc [Thu, 22 Nov 2012 01:33:55 +0000 (19:33 -0600)]
radioshack-dmm: Be more verbose with packet checks

Add sr_spew() messages to state why the packet was found to be invalid.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoradioshack-dmm: Check for valid mode before calculating checksum
Alexandru Gagniuc [Thu, 22 Nov 2012 01:30:26 +0000 (19:30 -0600)]
radioshack-dmm: Check for valid mode before calculating checksum

The packet mode byte is akin to a signature. If that is invalid, there's
no point in calculating the checksum, so check the mode first.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoradioshack-dmm: Improve serial detection
Alexandru Gagniuc [Thu, 22 Nov 2012 01:19:58 +0000 (19:19 -0600)]
radioshack-dmm: Improve serial detection

For device detection, use serial_stream_detect() instead of
serial_readline() + custom logic.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial.c: Sanitize serial_stream_detect
Alexandru Gagniuc [Thu, 22 Nov 2012 01:18:21 +0000 (19:18 -0600)]
serial.c: Sanitize serial_stream_detect

Print the timeout in miliseconds, not microseconds.
Only calculate elapsed time once oer loop.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoImprove compatibility with various kinds of VCD files.
Petteri Aimonen [Wed, 21 Nov 2012 15:03:49 +0000 (17:03 +0200)]
Improve compatibility with various kinds of VCD files.

11 years agoAdd downsample and skip parameters to input/vcd.
Petteri Aimonen [Wed, 21 Nov 2012 14:28:55 +0000 (16:28 +0200)]
Add downsample and skip parameters to input/vcd.

11 years agoVCD data parsing
Petteri Aimonen [Tue, 20 Nov 2012 20:24:17 +0000 (22:24 +0200)]
VCD data parsing

11 years agoBeginnings of VCD input module.
Petteri Aimonen [Tue, 20 Nov 2012 19:03:06 +0000 (21:03 +0200)]
Beginnings of VCD input module.

File header parsing implemented.
Data parsing not yet implemented.

11 years agoAdd support for fs and ps to sr_parse_period.
Petteri Aimonen [Tue, 20 Nov 2012 19:02:14 +0000 (21:02 +0200)]
Add support for fs and ps to sr_parse_period.

These time units are used in VCD files.

11 years agoAdd Metex 14-byte ASCII protocol parser.
Uwe Hermann [Wed, 14 Nov 2012 17:38:26 +0000 (18:38 +0100)]
Add Metex 14-byte ASCII protocol parser.

11 years agools: if no serial port specified, this driver is not used.
Bert Vermeulen [Fri, 16 Nov 2012 14:26:17 +0000 (15:26 +0100)]
ols: if no serial port specified, this driver is not used.

11 years agoMove serial_stream_detect() to serial.c.
Uwe Hermann [Wed, 14 Nov 2012 17:35:37 +0000 (18:35 +0100)]
Move serial_stream_detect() to serial.c.

11 years agoconfigure.ac: Update NEED_SERIAL list.
Uwe Hermann [Wed, 14 Nov 2012 17:29:27 +0000 (18:29 +0100)]
configure.ac: Update NEED_SERIAL list.

11 years agoserial: Compile-fix for Windows/MinGW.
Uwe Hermann [Wed, 14 Nov 2012 17:20:13 +0000 (18:20 +0100)]
serial: Compile-fix for Windows/MinGW.

11 years agotekpower-dmm: Cosmetics.
Uwe Hermann [Mon, 5 Nov 2012 22:25:59 +0000 (23:25 +0100)]
tekpower-dmm: Cosmetics.

11 years agotekpower-dmm: Improve serial detection.
Alexandru Gagniuc [Fri, 2 Nov 2012 15:53:06 +0000 (10:53 -0500)]
tekpower-dmm: Improve serial detection.

Serial detection was using serial_readline, which stripped carriage
return from the packets. This made for a very unreliable detection
mechanism.

Switch to a timeout-based detection mechanism that parses the data
as it comes in. This also allows us to stop parsing once we found
our first valid packet.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoDrop obsolete genericdmm driver.
Uwe Hermann [Wed, 14 Nov 2012 14:18:02 +0000 (15:18 +0100)]
Drop obsolete genericdmm driver.

11 years agotekpower-dmm: use new serial API
Bert Vermeulen [Mon, 12 Nov 2012 11:50:42 +0000 (12:50 +0100)]
tekpower-dmm: use new serial API

11 years agoradioshack-dmm: use new serial API
Bert Vermeulen [Mon, 12 Nov 2012 11:41:10 +0000 (12:41 +0100)]
radioshack-dmm: use new serial API

11 years agotondaj-sl-814: use new serial API
Bert Vermeulen [Mon, 12 Nov 2012 02:00:32 +0000 (03:00 +0100)]
tondaj-sl-814: use new serial API

11 years agocolead-slm: use new serial API
Bert Vermeulen [Mon, 12 Nov 2012 01:48:04 +0000 (02:48 +0100)]
colead-slm: use new serial API

11 years agoagilent-dmm: use new serial API
Bert Vermeulen [Mon, 12 Nov 2012 01:25:37 +0000 (02:25 +0100)]
agilent-dmm: use new serial API

11 years agofluke-dmm: use new serial API
Bert Vermeulen [Mon, 12 Nov 2012 01:25:17 +0000 (02:25 +0100)]
fluke-dmm: use new serial API

11 years agools: use new serial API
Bert Vermeulen [Mon, 12 Nov 2012 01:24:47 +0000 (02:24 +0100)]
ols: use new serial API

11 years agoserial: revamp internal API
Bert Vermeulen [Sun, 11 Nov 2012 19:38:47 +0000 (20:38 +0100)]
serial: revamp internal API

The only thing to get passed around now is the struct sr_serial_dev_inst
pointer. This should make things more portable as well.

11 years agosigma/la8/demo: s/SR_PROBE_ANALOG/SR_PROBE_LOGIC/.
Uwe Hermann [Sun, 11 Nov 2012 18:40:14 +0000 (19:40 +0100)]
sigma/la8/demo: s/SR_PROBE_ANALOG/SR_PROBE_LOGIC/.

11 years agoalsa: Use message logging helpers.
Uwe Hermann [Sun, 11 Nov 2012 12:17:44 +0000 (13:17 +0100)]
alsa: Use message logging helpers.

11 years agooutput/gnuplot: Drop obsolete code.
Uwe Hermann [Sun, 11 Nov 2012 12:11:58 +0000 (13:11 +0100)]
output/gnuplot: Drop obsolete code.

11 years agocontrib/Makefile.am: Add missing files.
Uwe Hermann [Sun, 11 Nov 2012 12:10:29 +0000 (13:10 +0100)]
contrib/Makefile.am: Add missing files.

11 years agoVarious subsystems: Use message logging helpers.
Uwe Hermann [Sun, 11 Nov 2012 11:44:16 +0000 (12:44 +0100)]
Various subsystems: Use message logging helpers.

11 years agoOutput modules: Use message logging helpers.
Uwe Hermann [Sun, 11 Nov 2012 08:36:21 +0000 (09:36 +0100)]
Output modules: Use message logging helpers.

11 years agoInput modules: Use message logging helpers.
Uwe Hermann [Sun, 11 Nov 2012 08:20:08 +0000 (09:20 +0100)]
Input modules: Use message logging helpers.

11 years agoAll drivers: Drop unneeded comments.
Uwe Hermann [Sun, 11 Nov 2012 08:30:42 +0000 (09:30 +0100)]
All drivers: Drop unneeded comments.

11 years agovictor-dmm: Cosmetics.
Uwe Hermann [Sun, 11 Nov 2012 08:28:30 +0000 (09:28 +0100)]
victor-dmm: Cosmetics.

11 years agoserial: avoid Cyrillic conversion specifiers
Bert Vermeulen [Sun, 11 Nov 2012 02:27:51 +0000 (03:27 +0100)]
serial: avoid Cyrillic conversion specifiers

11 years agools: fix device discovery
Bert Vermeulen [Sun, 11 Nov 2012 02:10:29 +0000 (03:10 +0100)]
ols: fix device discovery

11 years agools: Do not randomly probe serial ports
Alexandru Gagniuc [Sat, 10 Nov 2012 01:52:45 +0000 (19:52 -0600)]
ols: Do not randomly probe serial ports

ols driver used to probe a series of available serial ports obtained
by regexp matching of common serial port names.
There are a number of problems with this approach:
1. It will probe all serial devices, including devices that do not
like to be probed, potentially causing them to act up.
2. It will try to probe serial ports which may already be opened in
other applications for other purposes.
3. It assumes the naming of the serial ports is set in stone, and
creates an unnecessary OS-specific list.
4. It produces unnecessary debug output even when an OLS device is
not connected.
5. etc...

Do not implicitly probe serial ports. Only probe the port specified
by the frontend, if any; otherwise, just quit.
Also get rid of all functionality in serial.c which was designed
specifically for random probing.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agocomment fix
Bert Vermeulen [Sun, 11 Nov 2012 01:11:49 +0000 (02:11 +0100)]
comment fix

11 years agolink-mso19: Use message logging helpers.
Uwe Hermann [Sat, 10 Nov 2012 18:39:37 +0000 (19:39 +0100)]
link-mso19: Use message logging helpers.

11 years agodemo: Use message logging helpers.
Uwe Hermann [Sat, 10 Nov 2012 17:24:05 +0000 (18:24 +0100)]
demo: Use message logging helpers.

11 years agohantek-dso: Use message logging helpers.
Uwe Hermann [Sat, 10 Nov 2012 17:19:30 +0000 (18:19 +0100)]
hantek-dso: Use message logging helpers.

11 years agoasix-sigma: Use message logging helpers.
Uwe Hermann [Sat, 10 Nov 2012 12:42:00 +0000 (13:42 +0100)]
asix-sigma: Use message logging helpers.

11 years agoradioshack-dmm: Use new file naming conventions.
Uwe Hermann [Sat, 10 Nov 2012 12:32:46 +0000 (13:32 +0100)]
radioshack-dmm: Use new file naming conventions.

11 years agoradioshack-dmm: Move some stuff out of .h file.
Uwe Hermann [Sat, 10 Nov 2012 12:30:02 +0000 (13:30 +0100)]
radioshack-dmm: Move some stuff out of .h file.

Most of the enums and #defines are not needed in multiple files, just
put them in the respective .c file where they're used.

11 years agoradioshack-dmm: Cosmetics, coding-style, cleanups.
Uwe Hermann [Sat, 10 Nov 2012 11:51:57 +0000 (12:51 +0100)]
radioshack-dmm: Cosmetics, coding-style, cleanups.

Also, drop some uneeded code and simplify some parts.

11 years agoserial: Deduplicate log messages a bit.
Uwe Hermann [Sat, 10 Nov 2012 00:42:32 +0000 (01:42 +0100)]
serial: Deduplicate log messages a bit.

11 years agoAdd initial Tondaj SL-814 protocol handling.
Uwe Hermann [Fri, 9 Nov 2012 02:40:53 +0000 (03:40 +0100)]
Add initial Tondaj SL-814 protocol handling.

11 years agotondaj-sl-814: Initial driver skeleton.
Uwe Hermann [Fri, 9 Nov 2012 02:33:05 +0000 (03:33 +0100)]
tondaj-sl-814: Initial driver skeleton.

11 years agoagilent-dmm: use standard serial_readline()
Bert Vermeulen [Wed, 7 Nov 2012 00:25:10 +0000 (01:25 +0100)]
agilent-dmm: use standard serial_readline()

11 years agoserial_readline() now terminates on and strips CR and/or LF
Bert Vermeulen [Wed, 7 Nov 2012 00:24:23 +0000 (01:24 +0100)]
serial_readline() now terminates on and strips CR and/or LF

11 years agog_get_monotonic_time() takes a signed int64
Bert Vermeulen [Wed, 7 Nov 2012 00:23:24 +0000 (01:23 +0100)]
g_get_monotonic_time() takes a signed int64

11 years agoagilent-dmm: no need to specify a serialcomm scan parameter
Bert Vermeulen [Tue, 6 Nov 2012 23:46:30 +0000 (00:46 +0100)]
agilent-dmm: no need to specify a serialcomm scan parameter

It's always 9600/8n1 anyway.

11 years agochronovu-la8: not a bug if an unused driver gets asked to clean up
Bert Vermeulen [Tue, 6 Nov 2012 23:39:46 +0000 (00:39 +0100)]
chronovu-la8: not a bug if an unused driver gets asked to clean up

11 years agovictor-dmm: add protocol decoder
Bert Vermeulen [Tue, 6 Nov 2012 18:37:33 +0000 (19:37 +0100)]
victor-dmm: add protocol decoder

11 years agomore deconstifying sr_dev_inst for dev_acquisition_stop()
Bert Vermeulen [Tue, 6 Nov 2012 18:32:53 +0000 (19:32 +0100)]
more deconstifying sr_dev_inst for dev_acquisition_stop()

11 years agovictor-dmm: add basic USB driver skeleton
Bert Vermeulen [Tue, 6 Nov 2012 14:14:34 +0000 (15:14 +0100)]
victor-dmm: add basic USB driver skeleton

11 years agoallow for intermediate stage in stopping acquisition
Bert Vermeulen [Tue, 6 Nov 2012 14:02:37 +0000 (15:02 +0100)]
allow for intermediate stage in stopping acquisition

In the case of USB drivers, a driver's dev_acquisition_stop() cannot
simply remove its fd sources from the session and close its devices:
a USB transfer might still be underway, and it needs to be finished
(and its memory freed) properly.

An sr_dev_inst->status value is added: SR_ST_STOPPING, which should
be set when the driver's dev_acquisition_stop() is called, and acts
as a marker for the USB event handler to wind up its operations.

In order for dev_acquisition_stop() to be able to set the sdi status,
however, it needs to be unconstified.

11 years agovictor-dmm: Initial driver skeleton.
Bert Vermeulen [Fri, 2 Nov 2012 19:47:06 +0000 (20:47 +0100)]
victor-dmm: Initial driver skeleton.

11 years agozeroplus-logic-cube: Fix samplerate and trigger
Toshiaki Yoshida [Mon, 5 Nov 2012 07:06:14 +0000 (16:06 +0900)]
zeroplus-logic-cube: Fix samplerate and trigger

 - Default to 1MHz.
   The default sample rate is the lowest frequency (100Hz),
   but it takes a very long time until 128K memory is full.

 - Fix the 1MHz setting.

 - Use samplerate list.

 - Fix 10MHz frequency.

 - Fix trigger.

 - Change the size of memory according to the number of samples.

 - Add pre-trigger (capture ratio) setting.

 - Fix the first acquisition after power on.

11 years agouni-t-dmm: Use new USB helper functions.
Uwe Hermann [Fri, 2 Nov 2012 22:44:09 +0000 (23:44 +0100)]
uni-t-dmm: Use new USB helper functions.

11 years agogenericdmm: Factor out USB functions.
Uwe Hermann [Fri, 2 Nov 2012 20:04:21 +0000 (21:04 +0100)]
genericdmm: Factor out USB functions.

Move sr_usb_connect() and sr_usb_open() to hardware/common/usb.c in a
slightly more generic form and add more error checks and logging.

Let genericdmm use the new/moved functions.

11 years agocolead-slm: fix sloppy driver context handling
Bert Vermeulen [Fri, 2 Nov 2012 19:43:49 +0000 (20:43 +0100)]
colead-slm: fix sloppy driver context handling

11 years agoHACKING: Document enum setup.
Uwe Hermann [Fri, 2 Nov 2012 18:05:53 +0000 (19:05 +0100)]
HACKING: Document enum setup.

11 years agoAvoid future ABI breakage by hardcoding enum values.
Alexandru Gagniuc [Fri, 2 Nov 2012 16:56:56 +0000 (11:56 -0500)]
Avoid future ABI breakage by hardcoding enum values.

Whenever we added a field to the enums in libsigrok.h, we were running
the risk of breaking ABI compatibility. Any reordering of existing values
or the addition of entries other than at the bottom of the list would
cause an ABI breakage.

By hardcoding the values we ensure that any added field will have an
unused value, and will not take a value previously used by a different
flag. By doing this, we avoid confusing frontends compiled with an
earlier API.

We use 10000 as the first entry of each enum, and each "category" gets
an explicit number (10000, 20000, 30000, and so on).

Also avoid making the first value of an enum zero. A value of zero is
used as terminator item in some lists.

Remove explicit "DUMMY" (terminator) enum entries, they're not needed.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoserial: Output successful open and the FD.
Uwe Hermann [Fri, 2 Nov 2012 17:49:00 +0000 (18:49 +0100)]
serial: Output successful open and the FD.

11 years agoserial: Fix two segfaults.
Uwe Hermann [Fri, 2 Nov 2012 17:44:52 +0000 (18:44 +0100)]
serial: Fix two segfaults.

11 years agoserial: Fix some sr_err() items.
Uwe Hermann [Fri, 2 Nov 2012 17:35:08 +0000 (18:35 +0100)]
serial: Fix some sr_err() items.

11 years agogenericdmm: Drop left-over entry.
Uwe Hermann [Fri, 2 Nov 2012 17:16:58 +0000 (18:16 +0100)]
genericdmm: Drop left-over entry.

11 years agogenericdmm: Drop some dead code.
Uwe Hermann [Fri, 2 Nov 2012 17:05:18 +0000 (18:05 +0100)]
genericdmm: Drop some dead code.

11 years agoserial: More error-checking & logging, add baudrates.
Uwe Hermann [Fri, 2 Nov 2012 14:58:54 +0000 (15:58 +0100)]
serial: More error-checking & logging, add baudrates.

This mostly affects the non-Windows code so far, the rest will follow.

11 years agoserial: Add missing "break"s.
Uwe Hermann [Fri, 2 Nov 2012 14:57:21 +0000 (15:57 +0100)]
serial: Add missing "break"s.

This would otherwise cause bugs when e.g. asking for 2 stopbits.

11 years agocolead-slm: SL-5868P support
Bert Vermeulen [Fri, 2 Nov 2012 14:21:43 +0000 (15:21 +0100)]
colead-slm: SL-5868P support

11 years agoadd support for sound pressure level measurements
Bert Vermeulen [Fri, 2 Nov 2012 14:20:10 +0000 (15:20 +0100)]
add support for sound pressure level measurements

11 years agooutput/analog: add support for sound pressure level
Bert Vermeulen [Fri, 2 Nov 2012 14:19:01 +0000 (15:19 +0100)]
output/analog: add support for sound pressure level

11 years agoanalog: if no MQ unit was set of recognized, just print the value
Bert Vermeulen [Thu, 1 Nov 2012 22:38:10 +0000 (23:38 +0100)]
analog: if no MQ unit was set of recognized, just print the value

11 years agocolead-slm: Initial driver skeleton.
Bert Vermeulen [Mon, 29 Oct 2012 21:33:47 +0000 (22:33 +0100)]
colead-slm: Initial driver skeleton.

11 years agoRework FS9721 parser.
Uwe Hermann [Thu, 1 Nov 2012 14:58:09 +0000 (15:58 +0100)]
Rework FS9721 parser.

Merge parts of the tekpower-dmm code (the chip of the TekPower
TP4000ZC seems to be an FS9721_LP3 too) and rework parts of the functions.

Adapt the tekpower-dmm and uni-t-dmm code accordingly.

11 years agotekpower-dmm: Use generic fs9721 parser
Alexandru Gagniuc [Tue, 30 Oct 2012 04:42:10 +0000 (23:42 -0500)]
tekpower-dmm: Use generic fs9721 parser

Replace the parser with the fs9721 parser, which is just an adapted
version of this parser.

Signed-off-by: Alexandru Gagniuc <redacted>
11 years agoRemove 'float' output module.
Uwe Hermann [Tue, 30 Oct 2012 19:30:25 +0000 (20:30 +0100)]
Remove 'float' output module.

This has been replaced by the 'analog' output module.

11 years agoReturn SR_ERR_MALLOC upon allocation errors.
Uwe Hermann [Tue, 30 Oct 2012 19:20:22 +0000 (20:20 +0100)]
Return SR_ERR_MALLOC upon allocation errors.

Add some TODOs.

11 years agoFactor out serial_readline() to serial.c.
Uwe Hermann [Tue, 30 Oct 2012 18:59:21 +0000 (19:59 +0100)]
Factor out serial_readline() to serial.c.

Only one (slightly different) variant remains in agilent-dmm, this will
be merged soon too, though.

11 years agogenericdmm/victor-dmm: Use message logging helpers.
Uwe Hermann [Tue, 30 Oct 2012 17:56:04 +0000 (18:56 +0100)]
genericdmm/victor-dmm: Use message logging helpers.

11 years agoradioshack-dmm: Use message logging helpers.
Uwe Hermann [Tue, 30 Oct 2012 17:52:20 +0000 (18:52 +0100)]
radioshack-dmm: Use message logging helpers.

11 years agoagilent-dmm: Use message logging helpers.
Uwe Hermann [Tue, 30 Oct 2012 17:50:15 +0000 (18:50 +0100)]
agilent-dmm: Use message logging helpers.

11 years agofluke-dmm: Use message logging helpers.
Uwe Hermann [Tue, 30 Oct 2012 17:48:33 +0000 (18:48 +0100)]
fluke-dmm: Use message logging helpers.

11 years agouni-t-dmm: Simplify subdriver setup.
Uwe Hermann [Tue, 30 Oct 2012 13:23:05 +0000 (14:23 +0100)]
uni-t-dmm: Simplify subdriver setup.

So far, it seems we can make this work with just hw_init() needing to
be subdriver-specific (it will point 'di' to the respective per-subdriver
entry), the rest of the API functions can then use a strcmp() on di->name to
learn which subdriver they belong to.

11 years agoDraft: Make UT61D and VC-820 "first-class" drivers.
Uwe Hermann [Tue, 30 Oct 2012 12:11:27 +0000 (13:11 +0100)]
Draft: Make UT61D and VC-820 "first-class" drivers.

The 'uni-t-dmm' driver/directory will not appear as a "driver" to
frontends anymore, it's just an internal thing.

The frontends will see a uni-t-ut61d and voltcraft-vc820 driver now,
with the correct names and parsers etc. attached to them.

This is not fully finished yet, but it's a start (and works mostly):

  $ sigrok-cli -D
  The following devices were found:
  UNI-T UT61D with 1 probe: P1
  Voltcraft VC-820 with 1 probe: P1

  $ sigrok-cli --driver voltcraft-vc820 -D
  The following devices were found:
  Voltcraft VC-820 with 1 probe: P1

  $ sigrok-cli --driver uni-t-ut61d -D
  The following devices were found:
  UNI-T UT61D with 1 probe: P1

  # Now attaching a UNI-T UT61D device via USB.

  $ sigrok-cli --driver uni-t-ut61d --samples 3 -O analog
  P1: -0.017800 V DC
  P1: -0.017600 V DC
  P1: -0.017700 V DC

  # Now attaching a Voltcraft VC-820 device via USB instead.

  $ sigrok-cli --driver voltcraft-vc820 --samples 3 -O analog
  P1: -0.319200 V DC
  P1: -0.319300 V DC
  P1: -0.319300 V DC

11 years agodon't use deprecated g_thread_init/_create
Bert Vermeulen [Mon, 29 Oct 2012 21:10:05 +0000 (22:10 +0100)]
don't use deprecated g_thread_init/_create

11 years agorequire glib version >= 2.32
Bert Vermeulen [Mon, 29 Oct 2012 21:08:34 +0000 (22:08 +0100)]
require glib version >= 2.32

This allows us to do away with a few deprecated g_thread functions
in demo.c which throw deprecation warnings since glib 2.32.0.