Commit Graph

701 Commits

Author SHA1 Message Date
Lars-Peter Clausen bd47acabe3 sr: fx2lafw: Allocate header and packet struct on the stack
The header and packet struct are only used in the scope of this function and
they are freed at the end of it. Also these structs are rather small, so they
can safely be allocated on the stack. By doing so memory leaks on the error
paths are avoided.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-06-28 00:40:51 +02:00
Joel Holdsworth 0c156e06c5 fx2lafw: Made libusb_claim_interface error messages more informative 2012-06-28 00:40:48 +02:00
Bert Vermeulen 88a13f30bd hantek-dso: add profiles for all five models in the series
Also cleaned up profile struct, and use the new firmware filenames.
2012-06-27 19:36:30 +02:00
Bert Vermeulen 3b6c19303d fx2lafw: fix broken firmware upload timeout
Also corner case error init.
2012-06-27 01:02:39 +02:00
Bert Vermeulen fc8fe3e314 hantek-dso: get rid of broken GTV_TO_MSEC firmware upload timeout 2012-06-27 01:02:06 +02:00
Bert Vermeulen e749a8cb50 hantek-dso: start sending the frame only from the trigger point
Samples received before the trigger point are stored. From the
trigger point on, every chunk received from the device is sent
up the session bus. After the device has finished sending, the
stored samples are transmitted.
2012-06-26 23:26:55 +02:00
Lars-Peter Clausen fa114e4ab1 sr: fx2lafw: Set correct unitsize for trigger buffer
Commit 88b75eb719 ("fx2lafw: Added device caps and added support for wide
sampling") increased the size of the trigger buffer from 8 to 16 bit, but forgot
to adjust the unitsize logic packet which is used to send the contents of the
trigger buffer. This patch sets the unitsize to sizeof() of the trigger buffer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-06-25 19:48:21 +02:00
Bert Vermeulen e05a174be2 hantek-dso: fix triggerpoint conversion 2012-06-24 18:57:37 +02:00
Lars-Peter Clausen f3ab43a8fb sr: fx2lafw: Fix multistage trigger
Multistage triggers currently do no work, because there is a return statement
in the middle of the trigger detector which will be hit as soon as the first
stage in a multistage trigger matches. This patch removes the return statement
so that the trigger detector can continue to try to match the next stage. In
order for this to work we also make sure that the trigger stage is only reset
if the current sample does not match.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-06-24 14:35:26 +02:00
Bert Vermeulen e21e846330 sr/srd/cli: require glib version >= 2.28
Needed for g_get_monotonic_time(). Thanks to Tomaž Šolc.
2012-06-23 01:26:20 +02:00
Lars-Peter Clausen eabf24035b sr: fx2lafw: Fix memory leaks in receive_transfer
There are a few memory leaks in the receive_transfer transfer function. The most
serve of them is that a sample buffer is not freed if the triggered has not
matched yet, which causes a sigrok process which is waiting for a trigger to
consume several megabytes of memory within seconds. The other leaks are on the
error paths in that function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-06-22 09:23:30 +02:00
Uwe Hermann 9edfee3ee3 sr: ols: Fix incorrect comment. 2012-06-21 23:59:27 +02:00
Uwe Hermann eb1f1eb407 sr: Unfinished Mastech VA18B (DMM) support. 2012-06-21 23:56:24 +02:00
Uwe Hermann b908f067f2 sr: chronovu-la8: Split code into api.c and driver.c.
We should generally use api.c for API related functions and put the other
functions (mostly hardware-specific low-level code) into other C file(s)
for better readability.
2012-06-21 23:34:38 +02:00
Uwe Hermann 9956f2851f sr: analog: Add MQ and UNIT enums.
MQ is the measured quantity, e.g. voltage, current, temperature.

UNIT is the unit in which these quantities are measured, e.g. volt,
ampere, celsius, kelvin, etc. etc.

The same MQ can be specified in different UNITs by the driver, depending
on what the hardware reports. Conversion is left to the frontends.
2012-06-20 23:55:23 +02:00
Uwe Hermann c13536fa9c sr: backend/zeroplus: Improve debug output. 2012-06-19 23:33:50 +02:00
Bert Vermeulen d27e406e13 sr: new output format 'float', just floating point values
Also outputs FRAME-BEGIN and FRAME-END, if present in the stream.
2012-06-19 02:05:28 +02:00
Bert Vermeulen cdea754ae5 sr: remove unused code 2012-06-19 02:04:18 +02:00
Bert Vermeulen 4368827aef sr: only handling analog voltage units for now 2012-06-19 01:06:02 +02:00
Bert Vermeulen 6e6eeff47a hantek-dso: capturestate packet also contains the trigger point
Not yet used, but it's the key to knowing where in the frame to
start displaying; the frame is used as a circular buffer, and what
is sent is effectively a snapshot.
2012-06-18 23:09:37 +02:00
Bert Vermeulen a217bcdf10 hantek-dso: relays now set properly
They appear to be arranged to switch on/off a hierarchical series of
devices that attenuate the channel by an order of magnitude.
2012-06-18 23:05:02 +02:00
Uwe Hermann 384c28d9e7 sr: hantek-dso: Use portable g_ntohs() function.
The ntohs() from <arpa/inet.h> is not available on MinGW/Windows. There
are ways to work around this, but as we use glib already, using g_ntohs()
is the best option anyway.
2012-06-14 01:21:00 +02:00
Bert Vermeulen c5841b2809 hantek-dso: calculate voltage based on vdiv setting 2012-06-05 18:18:23 +02:00
Bert Vermeulen a10c805636 hantek-dso: default to DC coupling 2012-06-05 18:18:23 +02:00
Bert Vermeulen 1d97091e71 hantek-dso: fix CH2 vdiv setting 2012-06-05 18:18:23 +02:00
Bert Vermeulen 019d56633a sr: add udev entry for Victor 70C multimeter 2012-06-05 18:18:23 +02:00
Bert Vermeulen 0026228ad0 sr: fix udev rules for Hantek DSO-2090 2012-06-05 18:18:23 +02:00
Bert Vermeulen aff5a729ab sr: add unit field to sr_df_analog packet 2012-06-05 18:18:23 +02:00
Uwe Hermann 62bb8840e1 sr: hantek-dso: Consistency renames, constification. 2012-06-01 01:12:09 +02:00
Uwe Hermann 0236ab687f cli/gtk/qt: Now all require libsigrok >= 0.2.0 (API changes). 2012-06-01 00:36:52 +02:00
Uwe Hermann 63298404df sr: Increase pkg version to 0.2.0, increase lib version. 2012-06-01 00:36:52 +02:00
Uwe Hermann 0a88ec3d9c sr: fx2lafw: Use gboolean, cosmetics, fix gcc warning. 2012-05-31 22:48:40 +02:00
Uwe Hermann af36b80969 hantek-dso: Update to constified libsigrok API. 2012-05-31 22:43:12 +02:00
Uwe Hermann 88ff66c2c9 hantek-dso: Quickfix for build issue (will be removed later). 2012-05-31 22:40:41 +02:00
Joel Holdsworth f4575b6549 fx2lafw: Added a check to limit the sample rate during 16-bit sampling 2012-05-31 19:53:36 +01:00
Joel Holdsworth d1ddc7a9a8 fx2lafw: Added device caps and added support for wide sampling 2012-05-31 19:52:32 +01:00
Joel Holdsworth a533743dd1 sr: Made sample rate lists const 2012-05-31 19:51:11 +01:00
Joel Holdsworth 1b79df2f57 sr: Made the dev_config_set parameter a const pointer 2012-05-31 19:51:11 +01:00
Joel Holdsworth b7f578bef5 sr: Made the dev_info_get return value const 2012-05-31 19:51:10 +01:00
Joel Holdsworth 915f7cc87a sr: Made hwcap const 2012-05-31 19:51:09 +01:00
Bert Vermeulen 2715c0b86b hantek-dso: hopefully handle endianness in voltage setting 2012-05-30 23:56:13 +02:00
Bert Vermeulen 4a090d722d hantek-dso: enable SR_HWCAP_COUPLING 2012-05-30 23:56:13 +02:00
Bert Vermeulen b58fbd99c8 hantek-dso: support for SR_HWCAP_COUPLING 2012-05-30 23:56:13 +02:00
Bert Vermeulen e1c8b2abfb sr: support for SR_HWCAP_COUPLING and SR_DI_COUPLING 2012-05-30 23:56:12 +02:00
Bert Vermeulen 313deed219 hantek-dso: support SR_HWCAP_VDIV 2012-05-30 23:56:12 +02:00
Bert Vermeulen bd8db307da sr: support for SR_HWCAP_VDIV and SR_DI_VDIVS 2012-05-30 23:56:12 +02:00
Bert Vermeulen 79afc8cac4 sr: add voltage parser and prettyprinter 2012-05-30 23:56:12 +02:00
Bert Vermeulen c1e486185e sr: use SR_T_RATIONAL_PERIOD (new-style types)
SR_T_<type>_<parsehint>
2012-05-30 23:56:12 +02:00
Bert Vermeulen ebb781a69f hantek-dso: support for SR_HWCAP_FILTER 2012-05-30 23:56:12 +02:00
Bert Vermeulen 3c4976c9c4 sr: support for SR_HWCAP_FILTER and SR_DI_FILTERS 2012-05-30 23:56:12 +02:00