Commit Graph

3151 Commits

Author SHA1 Message Date
Bert Vermeulen a5892391b0 Add analog helper sr_analog_unit_to_string(). 2014-11-18 01:16:27 +01:00
Bert Vermeulen c2a25ebb8f Add analog helper sr_analog_float_to_string(). 2014-11-18 01:15:41 +01:00
Bert Vermeulen 1954dfa963 Show SR_DF_ANALOG2 packets in debug output. 2014-11-18 00:24:37 +01:00
Bert Vermeulen 28b4243493 victor-dmm: Set spec digits to 3, matching the display. 2014-11-18 00:24:08 +01:00
Bert Vermeulen 4b4fdeea94 analog: Fix analog_to_float typos, and cleanup.
This was adding 1 to every measurement being converted.
2014-11-17 23:08:49 +01:00
Aurelien Jacobs 41caa31909 Add a sr_analog_init() API to initialize sr_datafeed_analog2 struct.
It fills the fields with reasonable default values that should suit
most of the drivers. Drivers are obviously free to override the fields
they want after initializing.
2014-11-17 22:04:24 +01:00
Aurelien Jacobs 62f155f0c7 demo: Fix analog output at low samplerate. 2014-11-17 13:39:53 +01:00
Aurelien Jacobs 3772c04990 demo: Fix square pattern output shorter than other patterns. 2014-11-17 13:39:53 +01:00
Bert Vermeulen c6dde8125a Check driver capabilities before sr_config_get/set/list. 2014-11-17 13:20:32 +01:00
Uwe Hermann baa0c2ae67 autogen.sh: Also warn if AX_CXX_COMPILE_STDCXX_11 is not available.
This fixes an error message when the file is not installed at all:

  ./autogen.sh: 67: [: Illegal number:

Turn the AX_CXX_COMPILE_STDCXX_11 errors into warnings though, since
it is (and should be) possible to build libsigrok (just the C library)
just fine, even without that macro or with an older version of it.
2014-11-15 01:07:12 +01:00
Jens Steinhauser ff50ad701e Check the version of the AX_CXX_COMPILE_STDCXX_11 macro. 2014-11-14 20:53:02 +01:00
Bert Vermeulen adfba7368a Refactor scan options check. 2014-11-14 20:25:12 +01:00
Uwe Hermann b8721d7cf0 bindings: Fix out-of-tree build.
This closes #473.
2014-11-14 20:01:12 +01:00
Uwe Hermann b71356d631 bindings: Re-enable Java, but ignore create_analog_packet().
This will need some fixing.
2014-11-14 16:58:38 +01:00
Bert Vermeulen 071151b578 sr_driver_scan: Enforce options passed in by client. 2014-11-14 12:22:54 +01:00
Bert Vermeulen 4b664cd6ce demo: Use allocation for model string. 2014-11-14 11:37:11 +01:00
Uwe Hermann 676877f6ce mic-985xx: Convert to use SR_DF_ANALOG2. 2014-11-13 22:51:39 +01:00
Uwe Hermann a84a26d98a victor-dmm: Convert to use SR_DF_ANALOG2. 2014-11-13 22:51:39 +01:00
Bert Vermeulen e02e9e6a1c output/analog: Add SR_DF_ANALOG2 support. 2014-11-13 22:51:39 +01:00
Bert Vermeulen fb019a0e4d Add sr_analog_to_float(). 2014-11-13 22:51:39 +01:00
Bert Vermeulen d2e0f58539 Add SR_DF_ANALOG2 and related structs.
New structs:
 - sr_rational
 - sr_datafeed_analog2
 - sr_analog_encoding
 - sr_analog_meaning
 - sr_analog_spec
2014-11-13 22:35:54 +01:00
Martin Ling d2a929ab85 bindings: Fix enums.py compatibility with Python 3. 2014-11-13 20:38:56 +00:00
Uwe Hermann 624d16100e bindings: Add Session::context(). 2014-11-13 19:15:37 +01:00
Uwe Hermann 57621c6d60 configure.ac: Temporarily disable Java bindings.
Those need a bugfix to make them build again:

  bindings/java/org/sigrok/core/classes/Context.java:92: error: method Context_create_analog_packet in class classesJNI cannot be applied to given types;
        long cPtr = classesJNI.Context_create_analog_packet(swigCPtr, this, ChannelVector.getCPtr(tempchannels), SWIGTYPE_p_float.getCPtr(data_pointer), num_samples, Quantity.getCPtr(mq), mq, Unit.getCPtr(unit), unit, QuantityFlagVector.getCPtr(mqflags), mqflags);
                              ^
    required: long,Context,Vector<Channel>,long,long,long,Quantity,long,Unit,long,QuantityFlagVector
    found: long,Context,long,long,long,long,Quantity,long,Unit,long,QuantityFlagVector
    reason: actual argument long cannot be converted to Vector<Channel> by method invocation conversion
  1 error
  Makefile:3352: recipe for target 'bindings/java/sigrok-core.jar' failed
2014-11-13 18:51:33 +01:00
Martin Ling 304be4a771 bindings: Add packet constructors. 2014-11-13 18:37:57 +01:00
Martin Ling b2db9f3bbe bindings: Add QuantityFlag::mask_from_flags() method. 2014-11-13 18:37:57 +01:00
Martin Ling 9fa5b426ec bindings: Add UserDevice wrapping. 2014-11-13 18:37:57 +01:00
Uwe Hermann 0af636bed9 Change sr_dev_inst_new() to take no parameters.
Change all callers to set the fields manually as needed.
2014-11-12 17:18:46 +01:00
Uwe Hermann c7e4556258 HACKING: Document the new malloc related guidelines. 2014-11-12 16:35:05 +01:00
Uwe Hermann 487c23fc99 HACKING: Minor updates. 2014-11-12 16:35:05 +01:00
Martin Ling ed6b4c4747 python: Wrap Analog::data() as a NumPy array. 2014-11-12 02:27:05 +01:00
Martin Ling b20635771c bindings: Expose Analog::channels() as an attribute. 2014-11-12 02:27:05 +01:00
Martin Ling ea22dc108b python: Return correct PacketPayload subclasses from Packet.payload() 2014-11-12 02:27:05 +01:00
Martin Ling 75fb30365e python: Fix error handling for callbacks. 2014-11-12 02:27:05 +01:00
Martin Ling f0c0dab5a9 python: Implement equality checks for EnumValue derived classes.
Fixes bug #443.
2014-11-12 02:27:05 +01:00
Martin Ling 7a36ceacb9 bindings: Support per-language extensions to EnumValue wrappers. 2014-11-12 02:27:05 +01:00
Martin Ling 444d6a3975 python: Fix mapping of vector & map attributes to Python types.
Fixes bug #382.
2014-11-12 02:27:05 +01:00
Martin Ling 062430a2fb bindings: Use new %attributevector and %attributemap macros. 2014-11-12 02:27:05 +01:00
Martin Ling e480df0c45 bindings: Expose ConfigKey::identifier as an attribute. 2014-11-12 02:27:04 +01:00
Martin Ling 189461b251 bindings: Expose EnumValue::id and EnumValue::name as attributes. 2014-11-12 02:27:04 +01:00
Martin Ling fe4096fde6 bindings: Wrap EnumValue base class. 2014-11-12 02:27:04 +01:00
Martin Ling 0bc1a7613a bindings: Rename ConfigKey::get(string) to get_by_identifier().
The polymorphism with get(int) causes problems here when a char * is passed.
2014-11-12 02:27:04 +01:00
Martin Ling 9d229ecb9e cxx: Implement more of EnumValue in template. 2014-11-12 02:27:04 +01:00
Bert Vermeulen 3250d8c7e0 output: Add srzip, the session file format.
The 'filename' option is required: this module creates the zip file
itself, and never actually outputs anything back to the calling frontend.
2014-11-12 00:12:59 +01:00
Uwe Hermann ccd3f5e5eb unit tests: Add a test case for sr_dev_inst_channel_add(). 2014-11-11 22:45:20 +01:00
Uwe Hermann 6b1adfaa86 unit tests: Add a test case for sr_dev_inst_user_new(). 2014-11-11 22:16:12 +01:00
Uwe Hermann e705ce3bf6 Add sr_dev_inst_user_new(), sr_dev_inst_channel_add(). 2014-11-11 22:16:12 +01:00
Uwe Hermann 924866d48d uni tests: Use sr_dev_inst_channels_get() to fix the build. 2014-11-11 21:28:16 +01:00
Uwe Hermann 80fe524740 bindings: Use getters now that 'struct sr_dev_inst' is opaque. 2014-11-11 16:55:37 +01:00
Uwe Hermann 2f5f97056a Constify the sdi parameter of all sr_dev_inst_*() getters. 2014-11-11 12:44:37 +01:00