diff --git a/Makefile.am b/Makefile.am index 45fa963f5..9ddbeb7d1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = hamlib.pc EXTRA_DIST = PLAN TODO LICENSE hamlib.m4 hamlib.pc.in README.developer \ - README.betatester README.win32 hamlib.spec + README.betatester README.win32 hamlib.spec config.rpath # BINDINGS_LIST subdirs are no longer built SUBDIRS = macros include lib $(subdirs) src @BACKEND_LIST@ @ROT_BACKEND_LIST@ \ @@ -18,7 +18,7 @@ DIST_SUBDIRS = macros include lib $(subdirs) src c++ bindings tests doc \ icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc \ rpcrig winradio easycomm fodtrack rpcrot drake rotorez \ flexradio sartek lowe rft rs tapr kit skanti wj racal tuner \ - gs232a heathkit spid + gs232a heathkit spid ars rpm: Makefile make dist diff --git a/ars/Makefile.am b/ars/Makefile.am new file mode 100644 index 000000000..f1c93216a --- /dev/null +++ b/ars/Makefile.am @@ -0,0 +1,8 @@ + +lib_LTLIBRARIES = hamlib-ars.la +hamlib_ars_la_SOURCES = ars.c +hamlib_ars_la_LDFLAGS = -no-undefined -module -avoid-version +hamlib_ars_la_LIBADD = $(top_builddir)/lib/libmisc.la \ + $(top_builddir)/src/libhamlib.la + +noinst_HEADERS = ars.h diff --git a/ars/Makefile.in b/ars/Makefile.in new file mode 100644 index 000000000..bcab3c7a8 --- /dev/null +++ b/ars/Makefile.in @@ -0,0 +1,621 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = ars +DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/macros/ac_python_devel.m4 \ + $(top_srcdir)/macros/aclocal-include.m4 \ + $(top_srcdir)/macros/acx_pthread.m4 \ + $(top_srcdir)/macros/argz.m4 $(top_srcdir)/macros/gr_pwin32.m4 \ + $(top_srcdir)/macros/gr_swig.m4 \ + $(top_srcdir)/macros/hl_getaddrinfo.m4 \ + $(top_srcdir)/macros/lf_warnings.m4 \ + $(top_srcdir)/macros/libtool.m4 $(top_srcdir)/macros/ltdl.m4 \ + $(top_srcdir)/macros/ltoptions.m4 \ + $(top_srcdir)/macros/ltsugar.m4 \ + $(top_srcdir)/macros/ltversion.m4 \ + $(top_srcdir)/macros/lt~obsolete.m4 \ + $(top_srcdir)/macros/perl.m4 $(top_srcdir)/macros/tcl.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(libdir)" +LTLIBRARIES = $(lib_LTLIBRARIES) +hamlib_ars_la_DEPENDENCIES = $(top_builddir)/lib/libmisc.la \ + $(top_builddir)/src/libhamlib.la +am_hamlib_ars_la_OBJECTS = ars.lo +hamlib_ars_la_OBJECTS = $(am_hamlib_ars_la_OBJECTS) +hamlib_ars_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(hamlib_ars_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(hamlib_ars_la_SOURCES) +DIST_SOURCES = $(hamlib_ars_la_SOURCES) +HEADERS = $(noinst_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ABI_VERSION = @ABI_VERSION@ +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMTAR = @AMTAR@ +AR = @AR@ +ARGZ_H = @ARGZ_H@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BACKENDEPS = @BACKENDEPS@ +BACKENDLNK = @BACKENDLNK@ +BACKEND_LIST = @BACKEND_LIST@ +BINDINGS = @BINDINGS@ +BINDING_ALL = @BINDING_ALL@ +BINDING_CHECK = @BINDING_CHECK@ +BINDING_CLEAN = @BINDING_CLEAN@ +BINDING_DISTCHECK = @BINDING_DISTCHECK@ +BINDING_DISTCLEAN = @BINDING_DISTCLEAN@ +BINDING_INSTALL_EXEC = @BINDING_INSTALL_EXEC@ +BINDING_LIB_TARGETS = @BINDING_LIB_TARGETS@ +BINDING_LIST = @BINDING_LIST@ +BINDING_UNINSTALL = @BINDING_UNINSTALL@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INCLTDL = @INCLTDL@ +INCLUDES = @INCLUDES@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBADD_DL = @LIBADD_DL@ +LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ +LIBADD_DLOPEN = @LIBADD_DLOPEN@ +LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ +LIBLTDL = @LIBLTDL@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBUSB_CFLAGS = @LIBUSB_CFLAGS@ +LIBUSB_LIBS = @LIBUSB_LIBS@ +LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ +LIBXML2_LIBS = @LIBXML2_LIBS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTDLDEPS = @LTDLDEPS@ +LTDLINCL = @LTDLINCL@ +LTDLOPEN = @LTDLOPEN@ +LTLIBOBJS = @LTLIBOBJS@ +LT_CONFIG_H = @LT_CONFIG_H@ +LT_DLLOADERS = @LT_DLLOADERS@ +LT_DLPREOPEN = @LT_DLPREOPEN@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MATH_LIBS = @MATH_LIBS@ +MKDIR_P = @MKDIR_P@ +NET_LIBS = @NET_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OSXLDFLAGS = @OSXLDFLAGS@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL_INC_DIR = @PERL_INC_DIR@ +PKG_CONFIG = @PKG_CONFIG@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@ +PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ +PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +RIGMATRIX = @RIGMATRIX@ +ROT_BACKENDEPS = @ROT_BACKENDEPS@ +ROT_BACKENDLNK = @ROT_BACKENDLNK@ +ROT_BACKEND_LIST = @ROT_BACKEND_LIST@ +RPMBUILD = @RPMBUILD@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SWIG = @SWIG@ +TCL_BIN_DIR = @TCL_BIN_DIR@ +TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@ +TCL_LIB_FILE = @TCL_LIB_FILE@ +TCL_LIB_SPEC = @TCL_LIB_SPEC@ +TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ +TCL_SRC_DIR = @TCL_SRC_DIR@ +USRP_CFLAGS = @USRP_CFLAGS@ +USRP_LIBS = @USRP_LIBS@ +VERSION = @VERSION@ +WINLDFLAGS = @WINLDFLAGS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +acx_pthread_config = @acx_pthread_config@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +cf_with_bindings = @cf_with_bindings@ +cf_with_cxx = @cf_with_cxx@ +cf_with_rpcgen = @cf_with_rpcgen@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +hamlibdocdir = @hamlibdocdir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +ltdl_LIBOBJS = @ltdl_LIBOBJS@ +ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sys_symbol_underscore = @sys_symbol_underscore@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +lib_LTLIBRARIES = hamlib-ars.la +hamlib_ars_la_SOURCES = ars.c +hamlib_ars_la_LDFLAGS = -no-undefined -module -avoid-version +hamlib_ars_la_LIBADD = $(top_builddir)/lib/libmisc.la \ + $(top_builddir)/src/libhamlib.la + +noinst_HEADERS = ars.h +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ars/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu ars/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +hamlib-ars.la: $(hamlib_ars_la_OBJECTS) $(hamlib_ars_la_DEPENDENCIES) + $(hamlib_ars_la_LINK) -rpath $(libdir) $(hamlib_ars_la_OBJECTS) $(hamlib_ars_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ars.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(libdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-libLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-libLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/ars/ars.c b/ars/ars.c new file mode 100644 index 000000000..17df3ccf6 --- /dev/null +++ b/ars/ars.c @@ -0,0 +1,495 @@ +/* + * Hamlib Rotator backend - ARS parallel port backend + * Copyright (c) 2010 by Stephane Fillod + * This code is inspired by work from Pablo GARCIA - EA4TX + * + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include /* String function definitions */ +#include /* UNIX standard function definitions */ +#ifdef HAVE_SYS_IOCTL_H +#include +#endif + +#include "hamlib/rotator.h" +#include "parallel.h" +#include "misc.h" +#include "register.h" + +#include "ars.h" + +#define CTL_PIN_CS PARPORT_CONTROL_AUTOFD /* pin14: Control Linefeed */ +#define CTL_PIN_CLK PARPORT_CONTROL_STROBE /* pin01: Control /Strobe */ +#define STA_PIN_D0 PARPORT_STATUS_BUSY /* pin11: Status Busy */ +#define STA_PIN_D1 PARPORT_STATUS_ERROR /* pin15: Status /Error */ + +#define DTA_PIN02 0x01 /* Data0 */ +#define DTA_PIN03 0x02 /* Data1 */ +#define DTA_PIN04 0x04 /* Data2 */ +#define DTA_PIN05 0x08 /* Data3 */ +#define DTA_PIN06 0x10 /* Data4 */ +#define DTA_PIN07 0x20 /* Data5 */ +#define DTA_PIN08 0x40 /* Data6 */ +#define DTA_PIN09 0x80 /* Data7 */ + +#define CTL_PIN16 PARPORT_CONTROL_INIT +#define CTL_PIN17 PARPORT_CONTROL_SELECT + +#define ARS_BRAKE_DELAY 100000 /* usecs */ +#define PP_IO_PERIOD 4000 /* usecs */ +#define NUM_SAMPLES 3 + +/* Check return value, with appropriate unlocking upon error. + * Assumes "rot" variable is current ROT pointer. + */ +#define CHKPPRET(a) \ + do { int _retval = a; if (_retval != RIG_OK) \ + {par_unlock (&rot->state.rotport);return _retval; }} while(0) + +static int ars_init(ROT *rot); +static int ars_cleanup(ROT *rot); +static int ars_open(ROT *rot); +static int ars_close(ROT *rot); +static int ars_stop(ROT *rot); +static int ars_move(ROT *rot, int direction, int speed); +static int ars_set_position(ROT *rot, azimuth_t az, elevation_t el); +static int ars_get_position(ROT *rot, azimuth_t *az, elevation_t *el); + +/* ************************************************************************* */ + +static int ars_clear_ctrl_pin(ROT *rot, unsigned char pin) +{ + hamlib_port_t *pport = &rot->state.rotport; + struct ars_priv_data *priv = (struct ars_priv_data *)rot->state.priv; + + priv->pp_control &= ~pin; + + return par_write_control(pport, priv->pp_control); +} + +static int ars_set_ctrl_pin(ROT *rot, unsigned char pin) +{ + hamlib_port_t *pport = &rot->state.rotport; + struct ars_priv_data *priv = (struct ars_priv_data *)rot->state.priv; + + priv->pp_control |= pin; + + return par_write_control(pport, priv->pp_control); +} + +static int ars_clear_data_pin(ROT *rot, unsigned char pin) +{ + hamlib_port_t *pport = &rot->state.rotport; + struct ars_priv_data *priv = (struct ars_priv_data *)rot->state.priv; + + priv->pp_data &= ~pin; + + return par_write_data(pport, priv->pp_data); +} + +static int ars_set_data_pin(ROT *rot, unsigned char pin) +{ + hamlib_port_t *pport = &rot->state.rotport; + struct ars_priv_data *priv = (struct ars_priv_data *)rot->state.priv; + + priv->pp_data |= pin; + + return par_write_data(pport, priv->pp_data); +} + +static int ars_has_el(const ROT *rot) +{ + return (rot->caps->rot_type & ROT_FLAG_ELEVATION); +} + +/* ************************************************************************* */ + +int +ars_init(ROT *rot) +{ + struct ars_priv_data *priv; + + if (!rot) + return -RIG_EINVAL; + + priv = (struct ars_priv_data*)malloc(sizeof(struct ars_priv_data)); + if (!priv) { + /* whoops! memory shortage! */ + return -RIG_ENOMEM; + } + + priv->pp_control = 0; + priv->pp_data = 0; + + priv->dac_res = 8; /* 8 bits vs. 10 bits DAC */ + priv->brake_off = 0; + + rot->state.priv = (void*)priv; + + return RIG_OK; +} + +int +ars_cleanup(ROT *rot) +{ + if (!rot) + return -RIG_EINVAL; + + if (rot->state.priv) { + free(rot->state.priv); + rot->state.priv = NULL; + } + + return RIG_OK; +} + +int +ars_open(ROT *rot) +{ + /* make it idle, and known state */ + ars_stop(rot); + + return RIG_OK; +} + +int +ars_close(ROT *rot) +{ + /* leave it in safe state */ + ars_stop(rot); + + return RIG_OK; +} + +int +ars_stop(ROT *rot) +{ + struct ars_priv_data *priv = (struct ars_priv_data *)rot->state.priv; + hamlib_port_t *pport = &rot->state.rotport; + + rig_debug(RIG_DEBUG_TRACE, "%s called, brake was %s\n", __func__, + priv->brake_off ? "OFF" : "ON"); + + priv->brake_off = 0; + + par_lock (pport); + + // Relay AUX -> Off + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN02 | DTA_PIN04 | DTA_PIN08)); + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN17 | CTL_PIN16)); + + // Elevation Relays -> Off + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN03 | DTA_PIN07)); + + par_unlock (pport); + + return RIG_OK; +} + +int +ars_move(ROT *rot, int direction, int speed) +{ + struct ars_priv_data *priv = (struct ars_priv_data *)rot->state.priv; + hamlib_port_t *pport = &rot->state.rotport; + + rig_debug(RIG_DEBUG_TRACE, "%s called %d\n", __func__, direction); + + par_lock (pport); + + if (!priv->brake_off && (direction & (ROT_MOVE_LEFT|ROT_MOVE_RIGHT))) { + /* release the brake */ + if (ars_has_el(rot)) { + // RCI Model Azim & Elev + // Desactivated CCW/CW relays + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN17 | CTL_PIN16)); + // Relay Aux + CHKPPRET(ars_set_data_pin(rot, DTA_PIN02 | DTA_PIN04 | DTA_PIN06 | DTA_PIN08)); + CHKPPRET(ars_clear_data_pin (rot, DTA_PIN09)); + } else { + // RCI Model Azimuth only + // Desactivated CCW/CW relays + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN17 | CTL_PIN16)); + // Relay Aux + CHKPPRET(ars_set_data_pin(rot, DTA_PIN02 | DTA_PIN04 | DTA_PIN06 | DTA_PIN07 | DTA_PIN08 | DTA_PIN09)); + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN03 | DTA_PIN05)); + } + priv->brake_off = 1; + usleep(ARS_BRAKE_DELAY); + } + + + if (ars_has_el(rot)) { + if (direction & ROT_MOVE_UP) { + /* UP */ + CHKPPRET(ars_set_data_pin(rot, DTA_PIN03 | DTA_PIN06 | DTA_PIN07)); + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN05 | DTA_PIN09)); + } else + if (direction & ROT_MOVE_DOWN) { + CHKPPRET(ars_set_data_pin(rot, DTA_PIN03 | DTA_PIN05 | DTA_PIN06 | DTA_PIN07)); + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN09)); + } + else { + // Elevation Relays -> Off + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN03 | DTA_PIN07)); + } + } + + if (direction & ROT_MOVE_LEFT) { + // Relay Left + if (ars_has_el(rot)) { + // RCI Model Azim & Elev + CHKPPRET(ars_set_data_pin(rot, DTA_PIN02 | DTA_PIN04 | DTA_PIN06)); + CHKPPRET(ars_set_ctrl_pin(rot, CTL_PIN16)); + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN09)); + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN17)); + } else { + // RCI Model Azimuth only + CHKPPRET(ars_set_data_pin(rot, DTA_PIN02 | DTA_PIN04 | DTA_PIN06 | DTA_PIN07 | DTA_PIN08)); + CHKPPRET(ars_set_ctrl_pin(rot, CTL_PIN16)); + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN03 | DTA_PIN05)); + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN17)); + } + } else + if (direction & ROT_MOVE_RIGHT) { + // Relay Right + if (ars_has_el(rot)) { + // RCI Model Azim & Elev + CHKPPRET(ars_set_data_pin (rot, DTA_PIN02 | DTA_PIN04 | DTA_PIN06)); + CHKPPRET(ars_set_ctrl_pin (rot, CTL_PIN17)); + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN09)); + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN16)); + } else { + // RCI Model Azimuth only + CHKPPRET(ars_set_data_pin(rot, DTA_PIN02 | DTA_PIN04 | DTA_PIN06 | DTA_PIN07 | DTA_PIN08)); + CHKPPRET(ars_set_ctrl_pin(rot, CTL_PIN17)); + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN03 | DTA_PIN05)); + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN16)); + } + } else { + // Relay AUX -> Off + CHKPPRET(ars_clear_data_pin(rot, DTA_PIN02 | DTA_PIN04 | DTA_PIN08)); + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN17 | CTL_PIN16)); + // AZ stop + } + + par_unlock (pport); + + return RIG_OK; +} + + +static int angle_in_range(float angle, float angle_base, float range) +{ + return (angle >= angle_base-range && angle <= angle_base+range); +} + +/* + * TODO: watchdog: when rotor is not moving any more + * TODO: make set_position asynchronous, with wait loop in background (pthread) + */ +int +ars_set_position(ROT *rot, azimuth_t az, elevation_t el) +{ + azimuth_t curr_az; + elevation_t curr_el; + int retval; + int az_move, el_move; + + rig_debug(RIG_DEBUG_TRACE, "%s called: %f %f\n", __func__, az, el); + + ars_stop(rot); + + retval = ars_get_position(rot, &curr_az, &curr_el); + if (retval != RIG_OK) + return retval; + + /* TODO: take into account DAC res (8 bits -> 1.4 deg at 360 deg) */ +#define AZ_RANGE 2. +#define EL_RANGE 2. + while (!angle_in_range(curr_az, az, AZ_RANGE) || + (ars_has_el(rot) && !angle_in_range(curr_el, el, EL_RANGE)) + ) { + + if (curr_az < (az-AZ_RANGE)) + az_move = ROT_MOVE_RIGHT; + else if (curr_az > (az+AZ_RANGE)) + az_move = ROT_MOVE_RIGHT; + else + az_move = 0; + + if (ars_has_el(rot)) { + if (curr_el < (el-EL_RANGE)) + el_move = ROT_MOVE_UP; + else if (curr_el > (el+EL_RANGE)) + el_move = ROT_MOVE_DOWN; + else + el_move = 0; + } else { + el_move = 0; + } + + retval = ars_move(rot, az_move|el_move, 0); + if (retval != RIG_OK) + return retval; + +#if 0 + /* wait some? + * At 360 deg/mn, that's 6 deg/sec. + */ + usleep(100000); +#endif + + retval = ars_get_position(rot, &curr_az, &curr_el); + if (retval != RIG_OK) + return retval; + } + + return ars_stop(rot); +} + + +static int comparunsigned(const void *a, const void *b) +{ + const unsigned ua=*(const unsigned*)a, ub = *(const unsigned*)b; + + return ua==ub ? 0 : uastate.priv; + struct rot_state *rs = &rot->state; + hamlib_port_t *pport = &rs->rotport; + int i, num_sample; + unsigned az_samples[NUM_SAMPLES], az_value; + unsigned el_samples[NUM_SAMPLES], el_value; + unsigned char status; + + par_lock (pport); + + for (num_sample=0; num_sample < NUM_SAMPLES; num_sample++) { + + /* read ADC value TLC(1)549 (8/10 bits), by SPI bitbanging */ + + usleep (PP_IO_PERIOD); + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN_CLK)); + usleep (PP_IO_PERIOD); + + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN_CS)); + usleep (PP_IO_PERIOD); + + az_samples[num_sample] = 0; + el_samples[num_sample] = 0; + + for (i = 0; i < priv->dac_res; i++) { + CHKPPRET(ars_set_ctrl_pin(rot, CTL_PIN_CLK)); + usleep (PP_IO_PERIOD); + + CHKPPRET(par_read_status(pport, &status)); + + az_samples[num_sample] <<= 1; + az_samples[num_sample] |= (status & STA_PIN_D0) ? 1 : 0; + + el_samples[num_sample] <<= 1; + el_samples[num_sample] |= (status & STA_PIN_D1) ? 1 : 0; + + CHKPPRET(ars_clear_ctrl_pin(rot, CTL_PIN_CLK)); + usleep (PP_IO_PERIOD); + } + + CHKPPRET(ars_set_ctrl_pin(rot, CTL_PIN_CS)); + + rig_debug(RIG_DEBUG_TRACE, "%s: raw samples: az %u, el %u\n", + __func__, az_samples[num_sample], el_samples[num_sample]); + + usleep (PP_IO_PERIOD); + } + + par_unlock (pport); + + qsort (az_samples, NUM_SAMPLES, sizeof(unsigned), comparunsigned); + qsort (el_samples, NUM_SAMPLES, sizeof(unsigned), comparunsigned); + + /* select median value in order to rule out glitches */ + az_value = az_samples[NUM_SAMPLES/2]; + el_value = el_samples[NUM_SAMPLES/2]; + + *az = rs->min_az + ((float)az_value * (rs->max_az - rs->min_az)) / ((1 << priv->dac_res)-1); + *el = rs->min_el + ((float)el_value * (rs->max_el - rs->min_el)) / ((1 << priv->dac_res)-1); + + rig_debug(RIG_DEBUG_TRACE, "%s: az=%.1f el=%.1f\n", __func__, *az, *el); + + return RIG_OK; +} + + +/* ************************************************************************* */ +/* + * ARS rotator capabilities. + */ + +const struct rot_caps rci_se8_rot_caps = { + .rot_model = ROT_MODEL_RCI_SE8, + .model_name = "ARS RCI-SE8", + .mfg_name = "EA4TX", + .version = "0.1", + .copyright = "LGPL", + .status = RIG_STATUS_ALPHA, + .rot_type = ROT_TYPE_AZEL, + .port_type = RIG_PORT_PARALLEL, + .write_delay = 0, + .post_write_delay = 10, + .timeout = 0, + .retry = 3, + + .min_az = 0, + .max_az = 360, + .min_el = 0, + .max_el = 180, /* TBC */ + + .rot_init = ars_init, + .rot_cleanup = ars_cleanup, + .rot_open = ars_open, + .rot_close = ars_close, + .set_position = ars_set_position, + .get_position = ars_get_position, + .stop = ars_stop, + .move = ars_move, + +}; + + +/* ************************************************************************* */ + +DECLARE_INITROT_BACKEND(ars) +{ + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + rot_register(&rci_se8_rot_caps); + + return RIG_OK; +} + +/* ************************************************************************* */ +/* end of file */ diff --git a/ars/ars.h b/ars/ars.h new file mode 100644 index 000000000..d5fbd2a4b --- /dev/null +++ b/ars/ars.h @@ -0,0 +1,34 @@ +/* + * Hamlib Rotator backend - ARS interface protocol + * Copyright (c) 2010 by Stephane Fillod + * + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ + +#ifndef _ROT_ARS_H +#define _ROT_ARS_H 1 + +struct ars_priv_data { + unsigned dac_res; + int brake_off; + unsigned char pp_control; + unsigned char pp_data; +}; + +extern const struct rot_caps rci_se8_rot_caps; + +#endif /* _ROT_ARS_H */ diff --git a/configure.ac b/configure.ac index f8fe898c0..50d968498 100644 --- a/configure.ac +++ b/configure.ac @@ -233,7 +233,7 @@ AC_SUBST(RIGMATRIX) BACKEND_LIST="icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc drake lowe rft rs kit skanti tapr flexradio wj racal tuner" -ROT_BACKEND_LIST="dummy easycomm fodtrack gs232a heathkit kit rotorez sartek spid" +ROT_BACKEND_LIST="dummy easycomm fodtrack gs232a heathkit kit rotorez sartek spid ars" BINDINGS="" BINDING_ALL="" BINDING_CHECK="" @@ -490,6 +490,7 @@ skanti/Makefile wj/Makefile racal/Makefile tuner/Makefile +ars/Makefile easycomm/Makefile fodtrack/Makefile gs232a/Makefile