kopia lustrzana https://github.com/Hamlib/Hamlib
improved and separated IC-10 based code (TS440,TS940,TS711,TS811,R5000) in its own file
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1728 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.1
rodzic
9be7264373
commit
049c354e79
|
@ -1,13 +1,17 @@
|
|||
|
||||
TSSRCLIST = ts850.c ts870s.c ts570.c ts450s.c ts440.c ts950.c ts50s.c \
|
||||
TSSRCLIST = ts850.c ts870s.c ts570.c ts450s.c ts950.c ts50s.c \
|
||||
ts790.c ts2000.c k2.c ts930.c \
|
||||
ts680.c ts690.c ts940.c ts711.c ts811.c ts140.c
|
||||
ts680.c ts690.c ts140.c
|
||||
|
||||
IC10SRCLIST = ts440.c ts940.c ts711.c ts811.c r5000.c
|
||||
|
||||
THSRCLIST = thd7.c thf7.c thg71.c tmd700.c tmv7.c
|
||||
|
||||
lib_LTLIBRARIES = hamlib-kenwood.la
|
||||
hamlib_kenwood_la_SOURCES = $(TSSRCLIST) $(THSRCLIST) kenwood.c th.c
|
||||
hamlib_kenwood_la_SOURCES = $(TSSRCLIST) $(THSRCLIST) $(IC10SRCLIST) \
|
||||
kenwood.c th.c ic10.c
|
||||
|
||||
hamlib_kenwood_la_LDFLAGS = -no-undefined -module -avoid-version
|
||||
hamlib_kenwood_la_LIBADD = $(top_builddir)/src/libhamlib.la @MATH_LIBS@
|
||||
|
||||
noinst_HEADERS = kenwood.h th.h
|
||||
noinst_HEADERS = kenwood.h th.h ic10.h
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - main file
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod and others
|
||||
*
|
||||
* $Id: kenwood.c,v 1.75 2004-03-29 20:54:26 f4dwv Exp $
|
||||
* $Id: kenwood.c,v 1.76 2004-05-02 17:17:31 fillods 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
|
||||
|
@ -350,73 +350,6 @@ int kenwood_get_vfo(RIG *rig, vfo_t *vfo)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* kenwood_old_set_vfo
|
||||
* Assumes rig!=NULL
|
||||
* for TS-940, TS-811, TS-711 and TS-440
|
||||
*/
|
||||
int kenwood_old_set_vfo(RIG *rig, vfo_t vfo)
|
||||
{
|
||||
unsigned char cmdbuf[16], ackbuf[16];
|
||||
int cmd_len, ack_len, retval;
|
||||
char vfo_function;
|
||||
|
||||
switch (vfo) {
|
||||
case RIG_VFO_VFO:
|
||||
case RIG_VFO_A: vfo_function = '0'; break;
|
||||
case RIG_VFO_B: vfo_function = '1'; break;
|
||||
case RIG_VFO_MEM: vfo_function = '2'; break;
|
||||
case RIG_VFO_CURR: return RIG_OK;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"kenwood_set_vfo: unsupported VFO %d\n",
|
||||
vfo);
|
||||
return -RIG_EINVAL;
|
||||
}
|
||||
|
||||
cmd_len = sprintf(cmdbuf, "FN%c%s", vfo_function, cmd_trm(rig));
|
||||
|
||||
ack_len = 0;
|
||||
retval = kenwood_transaction (rig, cmdbuf, cmd_len, ackbuf, &ack_len);
|
||||
return retval;
|
||||
}
|
||||
|
||||
/*
|
||||
* kenwood_old_get_vfo
|
||||
* Assumes rig!=NULL, !vfo
|
||||
* for TS-940, TS-811, TS-711 and TS-440
|
||||
*/
|
||||
int kenwood_old_get_vfo(RIG *rig, vfo_t *vfo)
|
||||
{
|
||||
unsigned char vfobuf[50];
|
||||
int vfo_len, retval;
|
||||
|
||||
|
||||
/* query RX VFO */
|
||||
vfo_len = 50;
|
||||
retval = kenwood_transaction (rig, "FN;", 3, vfobuf, &vfo_len);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
if (vfo_len != 4 || vfobuf[1] != 'N') {
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unexpected answer %s, "
|
||||
"len=%d\n", __FUNCTION__, vfobuf, vfo_len);
|
||||
return -RIG_ERJCTED;
|
||||
}
|
||||
|
||||
/* TODO: replace 0,1,2,.. constants by defines */
|
||||
switch (vfobuf[2]) {
|
||||
case '0': *vfo = RIG_VFO_A; break;
|
||||
case '1': *vfo = RIG_VFO_B; break;
|
||||
case '2': *vfo = RIG_VFO_MEM; break;
|
||||
default:
|
||||
rig_debug(RIG_DEBUG_ERR,"%s: unsupported VFO %c\n",
|
||||
__FUNCTION__, vfobuf[2]);
|
||||
return -RIG_EPROTO;
|
||||
}
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* kenwood_set_freq
|
||||
* Assumes rig!=NULL
|
||||
|
@ -526,7 +459,7 @@ int kenwood_set_rit(RIG * rig, vfo_t vfo, shortfreq_t rit)
|
|||
|
||||
info_len = 0;
|
||||
if (rit == 0)
|
||||
return kenwood_transaction(rig, "RC;", 3, infobuf, &info_len);
|
||||
return kenwood_transaction(rig, "RC;", 3, infobuf, &info_len);
|
||||
|
||||
if (rit > 0)
|
||||
c = 'U';
|
||||
|
@ -558,6 +491,15 @@ int kenwood_set_xit(RIG * rig, vfo_t vfo, shortfreq_t rit)
|
|||
return kenwood_set_rit(rig, vfo, rit);
|
||||
}
|
||||
|
||||
int kenwood_scan(RIG * rig, vfo_t vfo, scan_t scan, int ch)
|
||||
{
|
||||
unsigned char ackbuf[16];
|
||||
int ack_len = 0;
|
||||
|
||||
return kenwood_transaction (rig, scan==RIG_SCAN_STOP? "SC0;":"SC1;", 4,
|
||||
ackbuf, &ack_len);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* kenwood_set_mode
|
||||
|
@ -1068,6 +1010,7 @@ int kenwood_get_ptt(RIG *rig, vfo_t vfo, ptt_t *ptt)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* kenwood_set_ptt
|
||||
* Assumes rig!=NULL
|
||||
|
@ -1528,22 +1471,24 @@ DECLARE_INITRIG_BACKEND(kenwood)
|
|||
rig_register(&ts950sdx_caps);
|
||||
rig_register(&ts50s_caps);
|
||||
rig_register(&ts140_caps);
|
||||
rig_register(&ts440_caps);
|
||||
rig_register(&ts450s_caps);
|
||||
rig_register(&ts570d_caps);
|
||||
rig_register(&ts570s_caps);
|
||||
rig_register(&ts680s_caps);
|
||||
rig_register(&ts690s_caps);
|
||||
rig_register(&ts711_caps);
|
||||
rig_register(&ts811_caps);
|
||||
rig_register(&ts790_caps);
|
||||
rig_register(&ts850_caps);
|
||||
rig_register(&ts870s_caps);
|
||||
rig_register(&ts930_caps);
|
||||
rig_register(&ts940_caps);
|
||||
rig_register(&ts2000_caps);
|
||||
rig_register(&k2_caps);
|
||||
|
||||
rig_register(&ts440_caps);
|
||||
rig_register(&ts940_caps);
|
||||
rig_register(&ts711_caps);
|
||||
rig_register(&ts811_caps);
|
||||
rig_register(&r5000_caps);
|
||||
|
||||
rig_register(&tmd700_caps);
|
||||
rig_register(&thd7a_caps);
|
||||
rig_register(&thf7e_caps);
|
||||
|
@ -1553,4 +1498,3 @@ DECLARE_INITRIG_BACKEND(kenwood)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - main header
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: kenwood.h,v 1.35 2004-03-20 10:23:43 fillods Exp $
|
||||
* $Id: kenwood.h,v 1.36 2004-05-02 17:17:31 fillods 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
|
||||
|
@ -50,8 +50,7 @@ int kenwood_transaction(RIG *rig, const char *cmd, int cmd_len, char *data,
|
|||
int kenwood_set_vfo(RIG *rig, vfo_t vfo);
|
||||
int kenwood_get_vfo(RIG *rig, vfo_t *vfo);
|
||||
int kenwood_set_split_vfo(RIG *rig, vfo_t vfo , split_t split, vfo_t txvfo);
|
||||
int kenwood_old_set_vfo(RIG *rig, vfo_t vfo);
|
||||
int kenwood_old_get_vfo(RIG *rig, vfo_t *vfo);
|
||||
|
||||
int kenwood_set_freq(RIG *rig, vfo_t vfo, freq_t freq);
|
||||
int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq);
|
||||
int kenwood_set_rit(RIG * rig, vfo_t vfo, shortfreq_t rit);
|
||||
|
@ -76,6 +75,7 @@ int kenwood_get_dcd(RIG *rig, vfo_t vfo, dcd_t *dcd);
|
|||
int kenwood_vfo_op(RIG *rig, vfo_t vfo, vfo_op_t op);
|
||||
int kenwood_set_mem(RIG *rig, vfo_t vfo, int ch);
|
||||
int kenwood_get_mem(RIG *rig, vfo_t vfo, int *ch);
|
||||
int kenwood_scan(RIG *rig, vfo_t vfo, scan_t scan, int ch);
|
||||
const char* kenwood_get_info(RIG *rig);
|
||||
|
||||
int kenwood_set_trn(RIG *rig, int trn);
|
||||
|
@ -84,28 +84,30 @@ int kenwood_get_trn(RIG *rig, int *trn);
|
|||
extern const struct rig_caps ts950sdx_caps;
|
||||
extern const struct rig_caps ts50s_caps;
|
||||
extern const struct rig_caps ts140_caps;
|
||||
extern const struct rig_caps ts440_caps;
|
||||
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 ts680s_caps;
|
||||
extern const struct rig_caps ts690s_caps;
|
||||
extern const struct rig_caps ts711_caps;
|
||||
extern const struct rig_caps ts811_caps;
|
||||
extern const struct rig_caps ts790_caps;
|
||||
extern const struct rig_caps ts850_caps;
|
||||
extern const struct rig_caps ts870s_caps;
|
||||
extern const struct rig_caps ts930_caps;
|
||||
extern const struct rig_caps ts940_caps;
|
||||
extern const struct rig_caps ts2000_caps;
|
||||
extern const struct rig_caps k2_caps;
|
||||
|
||||
extern const struct rig_caps thd7a_caps;
|
||||
extern const struct rig_caps tmd700_caps;
|
||||
extern const struct rig_caps thf7a_caps;
|
||||
extern const struct rig_caps thf7e_caps;
|
||||
extern const struct rig_caps thg71_caps;
|
||||
extern const struct rig_caps tmv7_caps;
|
||||
extern const struct rig_caps k2_caps;
|
||||
|
||||
extern const struct rig_caps ts440_caps;
|
||||
extern const struct rig_caps ts940_caps;
|
||||
extern const struct rig_caps ts711_caps;
|
||||
extern const struct rig_caps ts811_caps;
|
||||
extern const struct rig_caps r5000_caps;
|
||||
|
||||
|
||||
#endif /* _KENWOOD_H */
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Hamlib Kenwood backend - TS440 description
|
||||
* Copyright (c) 2000-2003 by Stephane Fillod
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts440.c,v 1.9 2003-10-01 19:31:58 fillods Exp $
|
||||
* $Id: ts440.c,v 1.10 2004-05-02 17:17:31 fillods 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
|
||||
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <hamlib/rig.h>
|
||||
#include "kenwood.h"
|
||||
#include "ic10.h"
|
||||
|
||||
|
||||
#define TS440_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY)
|
||||
|
@ -61,12 +62,12 @@ const struct rig_caps ts440_caps = {
|
|||
.rig_model = RIG_MODEL_TS440,
|
||||
.model_name = "TS-440",
|
||||
.mfg_name = "Kenwood",
|
||||
.version = "0.2",
|
||||
.version = "0.3",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_UNTESTED,
|
||||
.status = RIG_STATUS_ALPHA,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_RIG,
|
||||
.dcd_type = RIG_DCD_NONE,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
.serial_rate_min = 1200,
|
||||
.serial_rate_max = 4800,
|
||||
|
@ -79,7 +80,7 @@ const struct rig_caps ts440_caps = {
|
|||
.timeout = 200,
|
||||
.retry = 3,
|
||||
|
||||
.has_get_func = TS440_FUNC_ALL,
|
||||
.has_get_func = RIG_FUNC_NONE,
|
||||
.has_set_func = TS440_FUNC_ALL,
|
||||
.has_get_level = TS440_LEVEL_ALL,
|
||||
.has_set_level = RIG_LEVEL_SET(TS440_LEVEL_ALL),
|
||||
|
@ -102,7 +103,7 @@ const struct rig_caps ts440_caps = {
|
|||
.chan_desc_sz = 0,
|
||||
|
||||
|
||||
.chan_list = { { 0, 99, RIG_MTYPE_MEM },
|
||||
.chan_list = { { 0, 99, RIG_MTYPE_MEM, {IC10_CHANNEL_CAPS} },
|
||||
RIG_CHAN_END, },
|
||||
|
||||
.rx_range_list1 = { RIG_FRNG_END, }, /* FIXME: enter region 1 setting */
|
||||
|
@ -146,32 +147,28 @@ const struct rig_caps ts440_caps = {
|
|||
.priv = (void *)&ts440_priv_caps,
|
||||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.get_freq = ic10_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_xit = kenwood_set_xit,
|
||||
.get_xit = kenwood_get_xit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_old_set_vfo,
|
||||
.get_vfo = kenwood_old_get_vfo,
|
||||
.set_ctcss_tone = kenwood_set_ctcss_tone,
|
||||
.get_ctcss_tone = kenwood_get_ctcss_tone,
|
||||
.get_mode = ic10_get_mode,
|
||||
.set_vfo = ic10_set_vfo,
|
||||
.get_vfo = ic10_get_vfo,
|
||||
.set_split_vfo = ic10_set_split_vfo,
|
||||
.get_split_vfo = ic10_get_split_vfo,
|
||||
.set_ptt = kenwood_set_ptt,
|
||||
.get_ptt = kenwood_get_ptt,
|
||||
.get_dcd = kenwood_get_dcd,
|
||||
.get_ptt = ic10_get_ptt,
|
||||
.set_func = kenwood_set_func,
|
||||
.get_func = kenwood_get_func,
|
||||
.set_level = kenwood_set_level,
|
||||
.get_level = kenwood_get_level,
|
||||
.vfo_op = kenwood_vfo_op,
|
||||
.set_mem = kenwood_set_mem,
|
||||
.get_mem = kenwood_get_mem,
|
||||
.get_mem = ic10_get_mem,
|
||||
.set_trn = kenwood_set_trn,
|
||||
.get_trn = kenwood_get_trn,
|
||||
.set_powerstat = kenwood_set_powerstat,
|
||||
.get_powerstat = kenwood_get_powerstat,
|
||||
.reset = kenwood_reset,
|
||||
.scan = kenwood_scan,
|
||||
.set_channel = ic10_set_channel,
|
||||
.get_channel = ic10_get_channel,
|
||||
.decode_event = ic10_decode_event,
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Hamlib Kenwood backend - TS-711 description
|
||||
* Copyright (c) 2000-2003 by Stephane Fillod
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts711.c,v 1.1 2003-11-10 15:59:36 fillods Exp $
|
||||
* $Id: ts711.c,v 1.2 2004-05-02 17:17:31 fillods 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
|
||||
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <hamlib/rig.h>
|
||||
#include "kenwood.h"
|
||||
#include "ic10.h"
|
||||
|
||||
|
||||
#define TS711_ALL_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM)
|
||||
|
@ -40,6 +41,7 @@
|
|||
#define TS711_VFO (RIG_VFO_A|RIG_VFO_B)
|
||||
|
||||
#define TS711_VFO_OP (RIG_OP_UP|RIG_OP_DOWN)
|
||||
#define TS711_SCAN_OP (RIG_SCAN_VFO)
|
||||
|
||||
static const struct kenwood_priv_caps ts711_priv_caps = {
|
||||
.cmdtrm = EOM_KEN,
|
||||
|
@ -48,7 +50,7 @@ static const struct kenwood_priv_caps ts711_priv_caps = {
|
|||
/*
|
||||
* ts711 rig capabilities.
|
||||
*
|
||||
* specs: http://www.qsl.net/sm7vhs/radio/kenwood/ts811/specs.htm
|
||||
* specs: http://www.qsl.net/sm7vhs/radio/kenwood/ts711/specs.htm
|
||||
*
|
||||
* TODO: protocol to be check with manual!
|
||||
*/
|
||||
|
@ -56,12 +58,12 @@ const struct rig_caps ts711_caps = {
|
|||
.rig_model = RIG_MODEL_TS711,
|
||||
.model_name = "TS-711",
|
||||
.mfg_name = "Kenwood",
|
||||
.version = "0.2.1",
|
||||
.version = "0.3",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_UNTESTED,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_RIG,
|
||||
.dcd_type = RIG_DCD_NONE,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
.serial_rate_min = 4800,
|
||||
.serial_rate_max = 4800,
|
||||
|
@ -83,6 +85,7 @@ const struct rig_caps ts711_caps = {
|
|||
.level_gran = {}, /* FIXME: granularity */
|
||||
.parm_gran = {},
|
||||
.vfo_ops = TS711_VFO_OP,
|
||||
.scan_ops = TS711_SCAN_OP,
|
||||
.ctcss_list = kenwood38_ctcss_list,
|
||||
.preamp = { RIG_DBLST_END, },
|
||||
.attenuator = { RIG_DBLST_END, },
|
||||
|
@ -95,7 +98,7 @@ const struct rig_caps ts711_caps = {
|
|||
.chan_desc_sz = 0,
|
||||
|
||||
/* FIXME: split memories, call channel, etc. */
|
||||
.chan_list = { { 1, 59, RIG_MTYPE_MEM },
|
||||
.chan_list = { { 1, 59, RIG_MTYPE_MEM, {IC10_CHANNEL_CAPS} },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
|
@ -142,28 +145,33 @@ const struct rig_caps ts711_caps = {
|
|||
.priv = (void *)&ts711_priv_caps,
|
||||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.get_freq = ic10_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_xit = kenwood_set_xit,
|
||||
.get_xit = kenwood_get_xit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
.get_vfo = kenwood_get_vfo,
|
||||
.set_ctcss_tone = kenwood_set_ctcss_tone,
|
||||
.get_ctcss_tone = kenwood_get_ctcss_tone,
|
||||
.get_ptt = kenwood_get_ptt,
|
||||
.get_mode = ic10_get_mode,
|
||||
.set_vfo = ic10_set_vfo,
|
||||
.get_vfo = ic10_get_vfo,
|
||||
.set_split_vfo = ic10_set_split_vfo,
|
||||
.get_split_vfo = ic10_get_split_vfo,
|
||||
.set_ptt = kenwood_set_ptt,
|
||||
.get_dcd = kenwood_get_dcd,
|
||||
.get_ptt = ic10_get_ptt,
|
||||
.set_func = kenwood_set_func,
|
||||
.get_func = kenwood_get_func,
|
||||
.set_level = kenwood_set_level,
|
||||
.get_level = kenwood_get_level,
|
||||
.vfo_op = kenwood_vfo_op,
|
||||
.set_mem = kenwood_set_mem,
|
||||
.get_mem = kenwood_get_mem,
|
||||
.get_mem = ic10_get_mem,
|
||||
.set_trn = kenwood_set_trn,
|
||||
.get_trn = kenwood_get_trn,
|
||||
.get_info = kenwood_get_info,
|
||||
.scan = kenwood_scan,
|
||||
.set_ctcss_tone = kenwood_set_ctcss_tone,
|
||||
.get_ctcss_tone = kenwood_get_ctcss_tone,
|
||||
.set_level = kenwood_set_level,
|
||||
.get_level = kenwood_get_level,
|
||||
.set_channel = ic10_set_channel,
|
||||
.get_channel = ic10_get_channel,
|
||||
.decode_event = ic10_decode_event,
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Hamlib Kenwood backend - TS-811 description
|
||||
* Copyright (c) 2000-2003 by Stephane Fillod
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts811.c,v 1.1 2003-11-10 15:59:36 fillods Exp $
|
||||
* $Id: ts811.c,v 1.2 2004-05-02 17:17:31 fillods 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
|
||||
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <hamlib/rig.h>
|
||||
#include "kenwood.h"
|
||||
#include "ic10.h"
|
||||
|
||||
|
||||
#define TS811_ALL_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM)
|
||||
|
@ -40,6 +41,7 @@
|
|||
#define TS811_VFO (RIG_VFO_A|RIG_VFO_B)
|
||||
|
||||
#define TS811_VFO_OP (RIG_OP_UP|RIG_OP_DOWN)
|
||||
#define TS811_SCAN_OP (RIG_SCAN_VFO)
|
||||
|
||||
static const struct kenwood_priv_caps ts811_priv_caps = {
|
||||
.cmdtrm = EOM_KEN,
|
||||
|
@ -56,7 +58,7 @@ const struct rig_caps ts811_caps = {
|
|||
.rig_model = RIG_MODEL_TS811,
|
||||
.model_name = "TS-811",
|
||||
.mfg_name = "Kenwood",
|
||||
.version = "0.2.1",
|
||||
.version = "0.3",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_UNTESTED,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
|
@ -83,6 +85,7 @@ const struct rig_caps ts811_caps = {
|
|||
.level_gran = {}, /* FIXME: granularity */
|
||||
.parm_gran = {},
|
||||
.vfo_ops = TS811_VFO_OP,
|
||||
.scan_ops = TS811_SCAN_OP,
|
||||
.ctcss_list = kenwood38_ctcss_list,
|
||||
.preamp = { RIG_DBLST_END, },
|
||||
.attenuator = { RIG_DBLST_END, },
|
||||
|
@ -95,7 +98,7 @@ const struct rig_caps ts811_caps = {
|
|||
.chan_desc_sz = 0,
|
||||
|
||||
/* FIXME: split memories, call channel, etc. */
|
||||
.chan_list = { { 1, 59, RIG_MTYPE_MEM },
|
||||
.chan_list = { { 1, 59, RIG_MTYPE_MEM, {IC10_CHANNEL_CAPS} },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
|
@ -142,28 +145,33 @@ const struct rig_caps ts811_caps = {
|
|||
.priv = (void *)&ts811_priv_caps,
|
||||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.get_freq = ic10_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_xit = kenwood_set_xit,
|
||||
.get_xit = kenwood_get_xit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
.get_vfo = kenwood_get_vfo,
|
||||
.set_ctcss_tone = kenwood_set_ctcss_tone,
|
||||
.get_ctcss_tone = kenwood_get_ctcss_tone,
|
||||
.get_ptt = kenwood_get_ptt,
|
||||
.get_mode = ic10_get_mode,
|
||||
.set_vfo = ic10_set_vfo,
|
||||
.get_vfo = ic10_get_vfo,
|
||||
.set_split_vfo = ic10_set_split_vfo,
|
||||
.get_split_vfo = ic10_get_split_vfo,
|
||||
.set_ptt = kenwood_set_ptt,
|
||||
.get_dcd = kenwood_get_dcd,
|
||||
.get_ptt = ic10_get_ptt,
|
||||
.set_func = kenwood_set_func,
|
||||
.get_func = kenwood_get_func,
|
||||
.set_level = kenwood_set_level,
|
||||
.get_level = kenwood_get_level,
|
||||
.vfo_op = kenwood_vfo_op,
|
||||
.set_mem = kenwood_set_mem,
|
||||
.get_mem = kenwood_get_mem,
|
||||
.get_mem = ic10_get_mem,
|
||||
.set_trn = kenwood_set_trn,
|
||||
.get_trn = kenwood_get_trn,
|
||||
.get_info = kenwood_get_info,
|
||||
.scan = kenwood_scan,
|
||||
.set_ctcss_tone = kenwood_set_ctcss_tone,
|
||||
.get_ctcss_tone = kenwood_get_ctcss_tone,
|
||||
.set_level = kenwood_set_level,
|
||||
.get_level = kenwood_get_level,
|
||||
.set_channel = ic10_set_channel,
|
||||
.get_channel = ic10_get_channel,
|
||||
.decode_event = ic10_decode_event,
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* Hamlib Kenwood backend - TS940 description
|
||||
* Copyright (c) 2000-2003 by Stephane Fillod
|
||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts940.c,v 1.1 2003-11-10 15:59:36 fillods Exp $
|
||||
* $Id: ts940.c,v 1.2 2004-05-02 17:17:31 fillods 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
|
||||
|
@ -29,20 +29,23 @@
|
|||
#include <hamlib/rig.h>
|
||||
#include "bandplan.h"
|
||||
#include "kenwood.h"
|
||||
#include "ic10.h"
|
||||
|
||||
|
||||
#define TS940_ALL_MODES (RIG_MODE_AM|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_CW|RIG_MODE_SSB)
|
||||
#define TS940_OTHER_TX_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY)
|
||||
#define TS940_AM_TX_MODES RIG_MODE_AM
|
||||
|
||||
/* FIXME: TBC */
|
||||
#define TS940_FUNC_ALL (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_NR|RIG_FUNC_ANF|RIG_FUNC_LOCK)
|
||||
#define TS940_FUNC_ALL RIG_FUNC_LOCK
|
||||
|
||||
#define TS940_LEVEL_ALL (RIG_LEVEL_ATT|RIG_LEVEL_SQL|RIG_LEVEL_STRENGTH|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_AGC)
|
||||
#define TS940_LEVEL_ALL RIG_LEVEL_NONE
|
||||
|
||||
#define TS940_VFO (RIG_VFO_A|RIG_VFO_B)
|
||||
#define TS940_ANTS (0)
|
||||
|
||||
#define TS940_VFO_OPS (RIG_OP_UP|RIG_OP_DOWN)
|
||||
#define TS940_SCAN_OPS (RIG_SCAN_VFO)
|
||||
|
||||
static const struct kenwood_priv_caps ts940_priv_caps = {
|
||||
.cmdtrm = EOM_KEN,
|
||||
};
|
||||
|
@ -58,25 +61,25 @@ const struct rig_caps ts940_caps = {
|
|||
.rig_model = RIG_MODEL_TS940,
|
||||
.model_name = "TS-940S",
|
||||
.mfg_name = "Kenwood",
|
||||
.version = "0.2",
|
||||
.version = "0.3",
|
||||
.copyright = "LGPL",
|
||||
.status = RIG_STATUS_UNTESTED,
|
||||
.status = RIG_STATUS_ALPHA,
|
||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||
.ptt_type = RIG_PTT_RIG,
|
||||
.dcd_type = RIG_DCD_RIG,
|
||||
.dcd_type = RIG_DCD_NONE,
|
||||
.port_type = RIG_PORT_SERIAL,
|
||||
.serial_rate_min = 1200,
|
||||
.serial_rate_max = 57600, /* TBC */
|
||||
.serial_rate_max = 4800,
|
||||
.serial_data_bits = 8,
|
||||
.serial_stop_bits = 1,
|
||||
.serial_stop_bits = 2,
|
||||
.serial_parity = RIG_PARITY_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_NONE,
|
||||
.serial_handshake = RIG_HANDSHAKE_HARDWARE,
|
||||
.write_delay = 0,
|
||||
.post_write_delay = 0,
|
||||
.timeout = 200,
|
||||
.retry = 3,
|
||||
|
||||
.has_get_func = TS940_FUNC_ALL,
|
||||
.has_get_func = RIG_FUNC_NONE,
|
||||
.has_set_func = TS940_FUNC_ALL,
|
||||
.has_get_level = TS940_LEVEL_ALL,
|
||||
.has_set_level = RIG_LEVEL_SET(TS940_LEVEL_ALL),
|
||||
|
@ -90,14 +93,16 @@ const struct rig_caps ts940_caps = {
|
|||
.max_xit = kHz(9.99),
|
||||
.max_ifshift = Hz(0),
|
||||
.targetable_vfo = RIG_TARGETABLE_FREQ,
|
||||
.vfo_ops = TS940_VFO_OPS,
|
||||
.scan_ops = TS940_SCAN_OPS,
|
||||
.transceive = RIG_TRN_RIG,
|
||||
.bank_qty = 0,
|
||||
.chan_desc_sz = 0,
|
||||
|
||||
|
||||
.chan_list = {
|
||||
{ 0, 89, RIG_MTYPE_MEM }, /* TBC */
|
||||
{ 90, 99, RIG_MTYPE_EDGE },
|
||||
{ 0, 89, RIG_MTYPE_MEM, {IC10_CHANNEL_CAPS} }, /* TBC */
|
||||
{ 90, 99, RIG_MTYPE_EDGE, {IC10_CHANNEL_CAPS} },
|
||||
RIG_CHAN_END,
|
||||
},
|
||||
|
||||
|
@ -146,30 +151,28 @@ const struct rig_caps ts940_caps = {
|
|||
.priv = (void *)&ts940_priv_caps,
|
||||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.get_freq = ic10_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_xit = kenwood_set_xit,
|
||||
.get_xit = kenwood_get_xit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
.get_vfo = kenwood_get_vfo,
|
||||
.get_ptt = kenwood_get_ptt,
|
||||
.get_mode = ic10_get_mode,
|
||||
.set_vfo = ic10_set_vfo,
|
||||
.get_vfo = ic10_get_vfo,
|
||||
.set_split_vfo = ic10_set_split_vfo,
|
||||
.get_split_vfo = ic10_get_split_vfo,
|
||||
.set_ptt = kenwood_set_ptt,
|
||||
.get_dcd = kenwood_get_dcd,
|
||||
.get_ptt = ic10_get_ptt,
|
||||
.set_func = kenwood_set_func,
|
||||
.get_func = kenwood_get_func,
|
||||
.set_level = kenwood_set_level,
|
||||
.get_level = kenwood_get_level,
|
||||
.vfo_op = kenwood_vfo_op,
|
||||
.set_mem = kenwood_set_mem,
|
||||
.get_mem = kenwood_get_mem,
|
||||
.get_mem = ic10_get_mem,
|
||||
.set_trn = kenwood_set_trn,
|
||||
.get_trn = kenwood_get_trn,
|
||||
.set_powerstat = kenwood_set_powerstat,
|
||||
.get_powerstat = kenwood_get_powerstat,
|
||||
.reset = kenwood_reset,
|
||||
.scan = kenwood_scan,
|
||||
.set_channel = ic10_set_channel,
|
||||
.get_channel = ic10_get_channel,
|
||||
.decode_event = ic10_decode_event,
|
||||
|
||||
};
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue