Commit graph

1219 commits

Author SHA1 Message Date
Ian Abbott
67a83184ad Makefile.am: Remove 'debian' from EXTRA_DIST.
The 'debian' target doesn't exist and there is no rule to make it, so
remove it from EXTRA_DIST.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2012-04-20 12:10:01 +01:00
Ian Abbott
38a3932fd9 Makefile.am: Don't bother removing CVS directories in dist-hook.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2012-04-20 11:57:23 +01:00
Ian Abbott
404cee44a9 todo: Added note about Ruby bindings disabled by default.
Signed-off-by: Ian Abbott <abbotti.mev.co.uk>
2012-04-20 10:42:25 +01:00
Ian Abbott
12fad7551d configure.ac: Use AS_HELP_STRING()
Use AS_HELP_STRING() to make the HELP-STRING arguments for the
AC_ARG_ENABLE() and AC_ARG_WITH() macro calls.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2012-04-20 10:34:27 +01:00
Ian Abbott
82456b6f98 configure: Disable Ruby bindings by default.
The SWIG Ruby bindings do not build cleanly from scratch.  They need an
existing installation of comedilib.  So disable them in the default
configuration.  They can be enabled with the --enable-ruby-bindings
configure option.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2012-04-20 10:11:57 +01:00
Ian Abbott
ee2986755a include/comedi.h: synced with comedi
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2012-04-16 14:53:28 +01:00
W. Trevor King
679c0fb5f7 driverwriting.xml: COMEDI_CB_EOA is also used to report end-of-output. 2012-04-16 08:58:20 -04:00
W. Trevor King
1fd268ccdb driverwriting.xml: COMEDI_CB_OVERFLOW is also used to report underflows. 2012-04-16 07:52:48 -04:00
W. Trevor King
5af8a8cf28 Add myself to the comedi.i copyright, since I just tweaked it.
I also added 2010 for:

  commit 3fe8e6baac
  Author: Ian Abbott <abbotti@mev.co.uk>
  Date:   Mon Dec 20 14:50:21 2010 +0000

    Add sampl_t and lsampl_t array_class()es to comedi.i.
    ...
    Patch from W. Trevor King.
2012-03-13 09:38:47 -04:00
W. Trevor King
db4fd99309 Suggest people use PYTHONPATH rather than adjusting sys.path internally.
The old method only worked out of the box if you were running Python
2.1 on a 586.  I imagine that is too small a slice of current users to
be worth hard coding ;).
2012-03-13 09:30:45 -04:00
W. Trevor King
55b6a03a50 Add myself to the old Python demo copyrights, since I just tweaked each demo. 2012-03-13 09:24:07 -04:00
W. Trevor King
b415c91aac Oops, fix copyright month on demo/python/insn.py. 2012-03-13 09:22:03 -04:00
W. Trevor King
3d79204427 Cast the period to an integer in demo/python/mmap.py's command setup.
This avoids:

   Traceback (most recent call last):
     ...
     File ".../mmap.py", line 96, in prepare_cmd
       C.scan_begin_arg = 1e9/freq
     ...
   TypeError: in method 'comedi_cmd_struct_scan_begin_arg_set',
      argument 2 of type 'unsigned int'
2012-03-13 09:17:08 -04:00
W. Trevor King
8add63faa3 Adjust sys.path before importing mmap in demo/python/mmap.py.
With the previous implementation, `mmap` was importing the demo
script, not the standard `mmap` library module.  From the docs [1]:

  The directory containing the script being run is placed at the
  beginning of the search path, ahead of the standard library
  path. This means that scripts in that directory will be loaded
  instead of modules of the same name in the library directory.

I'm not sure when this changed in Python, since the demo script
presumably worked with an earlier version.

[1]: http://docs.python.org/tutorial/modules.html#the-module-search-path
2012-03-13 09:12:41 -04:00
W. Trevor King
7a277ab0cb Cast the period to an integer in demo/python/cmd.py's command setup.
This avoids:

  TypeError: in method 'comedi_get_cmd_generic_timed',
    argument 5 of type 'unsigned int'
2012-03-13 08:58:19 -04:00
W. Trevor King
fe3cdd466b Add serial and PWM subdevice types to demo/python/info.py.
This catches it up for the folowing commits to the comedi repository:

  commit 311e9c540217d60bdf56a1dba9eafe474fd3b218
  Author: Bernd Porr <Bernd.Porr@f2s.com>
  Date:   Sun Jan 13 23:07:02 2008 +0000

    Added a proper PWM subdevice for comedi.

  commit 8092ed57ff38e1fcaf75a7e0bf3b8c4f5372f3d7
  Author: Frank Mori Hess <fmhess@speakeasy.net>
  Date:   Sat Jan 31 22:13:09 2004 +0000

    serial dio (SCXI) support from Caleb Tennis
2012-03-13 08:55:08 -04:00
W. Trevor King
4b56f24232 Add chanlist_len to comedi_get_cmd_generic_timed() calls in Python demos.
This catches the Python demos up to:

  commit 003b9ec501
  Author: Ian Abbott <abbotti@mev.co.uk>
  Date:   Mon Nov 8 11:01:42 2010 +0000

    Add chanlist_len parameter to comedi_get_cmd_generic_timed.
2012-03-13 08:41:24 -04:00
W. Trevor King
70eca90662 Add demo/python/insn.py, a Python clone of demo/insn.c. 2012-03-13 08:36:39 -04:00
W. Trevor King
1fe137aa24 Add an insn_array array_class to comedi.i.
This makes it possible to populate `comedi_insnslist_struct` for use
with `comedi_do_insnlist`.

I also removed my earlier re-typedefs of `sampl_array` and
`lsampl_array`.  I didn't understand the reason for the underlying
`TypeError` when I added them.  The proper way to avoid that error is
to use the `.cast()` and `.frompointer()` methods.  See
`demo/python/insn.py` (coming soon) for details.
2012-03-13 08:31:36 -04:00
Ian Abbott
b09e05a776 Removed comedi_calibrate.8 man page.
The comedi_calibrate.8 man page has been moved to the comedi_calibrate
package where it belongs.  Thanks to W. Trevor King for pointing it out.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2012-02-13 11:36:13 +00:00
Ian Abbott
2665ee5627 libcomedi: don't ignore channel in comedi_set_clock_source()
Fix bug reported by Finn Hoffman on comedi email list.
2011-12-01 15:37:43 +00:00
Christoph Schmidt-Hieber
54712cbf6a m4/am-check-python-headers.m4: Python 3 wrapper for comedi
Here's a small patch to make the configure script compatible with Python
3. The wrapper itself (swig/python/comedi_python_wrap.c) will have to be
generated with SWIG >= 2.0.0 for Python 3 compatibility.
2011-08-17 10:36:24 +01:00
Ian Abbott
23e8eb609e comedi_test: Remove unnecessary assignment of 'go' when checking data
The 'go' variable is only used by the 'while' loop that reads the data.
We don't need to set it in the 'for' loop that checks the data
afterwards.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-06-27 13:08:08 +01:00
Ian Abbott
261d3e1029 comedi_test: Fix buffer overrun in test_mmap()
If the command does not stop immediately after the last sample, there
can be more data to read than we have room for.  Make sure the 'while'
loop 'read()' does not overrun the end of the malloc'ed 'buf'.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-06-27 13:03:03 +01:00
Ian Abbott
cceb2bc250 Fix a couple of typos.
A couple of the include files are missing the 'p' in 'published' in the
file header comment.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-05-11 12:05:55 +01:00
Ian Abbott
cf20e6af6b COMEDILIB_CFLAGS: Fix for separate build directory.
When doing an out-of-tree build, the comedi_version.h file is in
the build tree, not in the source tree.  The CFLAGS needs an additional
-I option so the compiler can find it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-05-11 11:45:07 +01:00
Ian Abbott
5d34786aba INSTALL: Changed cvs reference to git.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-05-10 14:42:46 +01:00
Ian Abbott
4941b694a7 README: Update mailing list details.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-05-10 14:41:02 +01:00
Ian Abbott
dee77a55ea README: Changed CVS references to Git.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-05-10 14:36:06 +01:00
Ian Abbott
73c59552bf README.CVS: Renamed to README.Git and edited slightly.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-05-10 14:22:16 +01:00
Ian Abbott
91a3504623 Add comedilib_version.h header, produced by ./configure,
included by comedilib.h, containing COMEDILIB_VERSION_MAJOR,
COMEDILIB_VERSION_MINOR, COMEDILIB_VERSION_MICRO, and
COMEDILIB_CHECK_VERSION(major,minor,micro).  This can be used to perform
C pre-processor checks for API changes in comedilib.
2011-01-26 16:29:34 +00:00
Ian Abbott
c530564317 #include <sys/stat.h> needed for fstat(). 2011-01-05 15:02:44 +00:00
Ian Abbott
cdb3a84f86 Updated procedures for building with Python's distutils. Also reduced
line-lengths for 80-character wide terminals.  Most of the updated text
supplied by W. Trevor King.  Ian Abbott added a note that it only applies
when building the wrappers separately from Comedilib without 'make'.
2010-12-20 15:49:59 +00:00
Ian Abbott
3fe8e6baac Add sampl_t and lsampl_t array_class()es to comedi.i.
This makes it easier (possible?) to setup comedi_insn_struct and
comedi_cmd_struct instances.

Patch from W. Trevor King.
2010-12-20 14:50:21 +00:00
Ian Abbott
8800748314 Adjust setup.py to link against libtool's lib/.libs/.
Patch from W. Trevor King.
2010-12-17 13:56:26 +00:00
Ian Abbott
d5e7c2a116 Revert previous commit, renaming comedi_wrap.c back to comedi_python_wrap.c.
Add "comedi_python.i" swig interface file which merely %includes the
"comedi.i" in the parent directory.  Fix paths in "setup.py" and set it up
to run swig directly (using "comedi_python.i" as the source).  Change
"_comedi.py" to "comedi.py" (but keep the underscore prefix on the .so
and .la files).
Based on a patch by W. Trevor King.
2010-12-16 16:03:35 +00:00
Ian Abbott
5605af7eba Use #ifdef SWIGRUBY around typemap(ruby,...) and remove the ruby argument. 2010-12-16 11:41:41 +00:00
Ian Abbott
6c6a5d5b4f Renamed comedi_python_wrap.c to the swig default comedi_wrap.c. 2010-12-16 11:34:07 +00:00
Ian Abbott
eb57419204 Tag comedi_sv_measure's data as a swig output in comedilib.h.
Patch from W. Trevor King.
2010-12-16 11:29:10 +00:00
Ian Abbott
be1d22cb79 Added W. Trevor King to AUTHORS. 2010-12-14 14:43:49 +00:00
Ian Abbott
aa7fd8061e Add -lm to comedilib.pc.in Libs.
Patch from W. Trevor King.
2010-12-14 14:41:55 +00:00
Ian Abbott
4b8bf1aff5 Import DESTDIR in swig/ruby/setup.rb for configurable rbconfig install paths.
Patch from W. Trevor King.
2010-12-14 14:37:18 +00:00
Ian Abbott
df57477cba Change --disable-docbook-binding to --disable-docbook in configure options.
Patch from W. Trevor King.
2010-12-14 10:32:39 +00:00
Ian Abbott
309fc0d7f8 Include chanlist length in call to comedi_get_cmd_generic_timed.
Truncate the Float period to an integer.
2010-11-08 11:38:40 +00:00
Ian Abbott
003b9ec501 Add chanlist_len parameter to comedi_get_cmd_generic_timed. 2010-11-08 11:01:42 +00:00
Ian Abbott
41759a9bea Defined SWIG_USE_OLD_TYPEMAPS as a temporary measure to work with SWIG 2.0. 2010-11-08 10:42:42 +00:00
Ian Abbott
5dcb180472 Specify EXTRA_DIST files in subdirectories explicitly. 2010-03-24 16:45:15 +00:00
Ian Abbott
b8a4f1a265 Added channel parameter to comedi_set_clock_source() and
comedi_get_clock_source().  Bumped library version to 0.10.0.
2010-03-19 13:44:56 +00:00
Ian Abbott
b06cecc151 comedi_find_range() should skip ranges that don't match specified units. 2010-02-17 18:28:15 +00:00
Ian Abbott
becded6ae0 Check subdevice type. 2009-08-13 11:16:04 +00:00