git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@696 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.1.3
Stéphane Fillod, F8CFE 2001-10-18 20:43:13 +00:00
rodzic 857d83e9c8
commit 29ade594a6
4 zmienionych plików z 46 dodań i 11 usunięć

Wyświetl plik

@ -1,9 +1,9 @@
TSSRCLIST = ts870s.c ts570.c ts450s.c
TSSRCLIST = ts870s.c ts570.c ts450s.c thd7.c
lib_LTLIBRARIES = libhamlib-kenwood.la
libhamlib_kenwood_la_SOURCES = $(TSSRCLIST) kenwood.c
libhamlib_kenwood_la_LDFLAGS = -no-undefined -module -avoid-version
#libhamlib_kenwood_la_LIBADD = ../src/libhamlib.la
libhamlib_kenwood_la_LIBADD = ../src/libhamlib.la
lib_LIBRARIES = libhamlib-kenwood.a
libhamlib_kenwood_a_SOURCES = $(TSSRCLIST) kenwood.c

Wyświetl plik

@ -60,6 +60,9 @@ host_triplet = @host@
AMTAR = @AMTAR@
AS = @AS@
AWK = @AWK@
BACKENDEPS = @BACKENDEPS@
BACKENDLNK = @BACKENDLNK@
BACKEND_LIST = @BACKEND_LIST@
CC = @CC@
CPP = @CPP@
CXX = @CXX@
@ -90,13 +93,13 @@ am__quote = @am__quote@
hamlibdocdir = @hamlibdocdir@
install_sh = @install_sh@
TSSRCLIST = ts870s.c ts570.c ts450s.c
TSSRCLIST = ts870s.c ts570.c ts450s.c thd7.c
lib_LTLIBRARIES = libhamlib-kenwood.la
libhamlib_kenwood_la_SOURCES = $(TSSRCLIST) kenwood.c
libhamlib_kenwood_la_LDFLAGS = -no-undefined -module -avoid-version
libhamlib_kenwood_la_LIBADD = ../src/libhamlib.la
#libhamlib_kenwood_la_LIBADD = ../src/libhamlib.la
lib_LIBRARIES = libhamlib-kenwood.a
libhamlib_kenwood_a_SOURCES = $(TSSRCLIST) kenwood.c
libhamlib_kenwood_a_LIBADD = ../src/libhamlib.la
@ -111,12 +114,12 @@ LIBRARIES = $(lib_LIBRARIES)
libhamlib_kenwood_a_AR = $(AR) cru
libhamlib_kenwood_a_DEPENDENCIES = ../src/libhamlib.la
am_libhamlib_kenwood_a_OBJECTS = ts870s.$(OBJEXT) ts570.$(OBJEXT) \
ts450s.$(OBJEXT) kenwood.$(OBJEXT)
ts450s.$(OBJEXT) thd7.$(OBJEXT) kenwood.$(OBJEXT)
libhamlib_kenwood_a_OBJECTS = $(am_libhamlib_kenwood_a_OBJECTS)
LTLIBRARIES = $(lib_LTLIBRARIES)
libhamlib_kenwood_la_LIBADD =
am_libhamlib_kenwood_la_OBJECTS = ts870s.lo ts570.lo ts450s.lo \
libhamlib_kenwood_la_DEPENDENCIES = ../src/libhamlib.la
am_libhamlib_kenwood_la_OBJECTS = ts870s.lo ts570.lo ts450s.lo thd7.lo \
kenwood.lo
libhamlib_kenwood_la_OBJECTS = $(am_libhamlib_kenwood_la_OBJECTS)
@ -127,6 +130,7 @@ LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/kenwood.Plo $(DEPDIR)/kenwood.Po \
@AMDEP_TRUE@ $(DEPDIR)/thd7.Plo $(DEPDIR)/thd7.Po \
@AMDEP_TRUE@ $(DEPDIR)/ts450s.Plo $(DEPDIR)/ts450s.Po \
@AMDEP_TRUE@ $(DEPDIR)/ts570.Plo $(DEPDIR)/ts570.Po \
@AMDEP_TRUE@ $(DEPDIR)/ts870s.Plo $(DEPDIR)/ts870s.Po
@ -227,6 +231,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kenwood.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/kenwood.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/thd7.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/thd7.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ts450s.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ts450s.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ts570.Plo@am__quote@

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Kenwood backend - main file
* Copyright (c) 2000,2001 by Stephane Fillod
*
* $Id: kenwood.c,v 1.15 2001-08-08 21:32:25 f4cfe Exp $
* $Id: kenwood.c,v 1.16 2001-10-18 20:43:13 f4cfe Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -70,6 +70,12 @@ struct kenwood_id {
int id;
};
struct kenwood_id_string {
rig_model_t model;
const char *id;
};
#define UNKNOWN_ID -1
/*
@ -88,6 +94,13 @@ static const struct kenwood_id kenwood_id_list[] = {
{ RIG_MODEL_NONE, UNKNOWN_ID }, /* end marker */
};
static const struct kenwood_id_string kenwood_id_string_list[] = {
{ RIG_MODEL_THD7A, "TH-D7" },
{ RIG_MODEL_THD7AG, "TH-D7G" },
{ RIG_MODEL_NONE, NULL }, /* end marker */
};
/*
* 38 CTCSS sub-audible tones
*/
@ -971,14 +984,26 @@ rig_model_t probe_kenwood(port_t *port)
/*
* reply should be something like 'IDxxx;'
*/
if (id_len != 6) {
idbuf[6] = '\0';
if (id_len != 5 || id_len != 6) {
idbuf[7] = '\0';
rig_debug(RIG_DEBUG_VERBOSE,"probe_kenwood: protocol error,"
" expected %d, received %d: %s\n",
6, id_len, idbuf);
return RIG_MODEL_NONE;
}
/* first, try ID string */
for (i=0; kenwood_id_string_list[i].model != RIG_MODEL_NONE; i++) {
if (!strncmp(kenwood_id_string_list[i].id, idbuf+2, 16)) {
rig_debug(RIG_DEBUG_VERBOSE,"probe_kenwood: "
"found %s\n", idbuf+2);
return kenwood_id_string_list[i].model;
}
}
/* then, try ID numbers */
k_id = atoi(idbuf+2);
for (i=0; kenwood_id_list[i].model != RIG_MODEL_NONE; i++) {
@ -1011,6 +1036,7 @@ int init_kenwood(void *be_handle)
rig_register(&ts570d_caps);
rig_register(&ts570s_caps);
rig_register(&ts870s_caps);
rig_register(&thd7a_caps);
return RIG_OK;
}

Wyświetl plik

@ -2,7 +2,7 @@
* Hamlib Kenwood backend - main header
* Copyright (c) 2000,2001 by Stephane Fillod
*
* $Id: kenwood.h,v 1.9 2001-08-08 21:32:25 f4cfe Exp $
* $Id: kenwood.h,v 1.10 2001-10-18 20:43:13 f4cfe Exp $
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
@ -25,6 +25,8 @@
extern const int kenwood38_ctcss_list[];
int kenwood_transaction(RIG *rig, const char *cmd, int cmd_len, char *data,
int *data_len);
int kenwood_set_vfo(RIG *rig, vfo_t vfo);
int kenwood_get_vfo(RIG *rig, vfo_t *vfo);
int kenwood_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
@ -55,6 +57,7 @@ extern const struct rig_caps ts450s_caps;
extern const struct rig_caps ts570d_caps;
extern const struct rig_caps ts570s_caps;
extern const struct rig_caps ts870s_caps;
extern const struct rig_caps thd7a_caps;
extern HAMLIB_EXPORT(int) init_kenwood(void *be_handle);
extern HAMLIB_EXPORT(rig_model_t) probe_kenwood(port_t *port);