kopia lustrzana https://github.com/Hamlib/Hamlib
add rit capabilities
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1147 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.1.4
rodzic
9051b8641a
commit
dd82c7ebe5
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - main file
|
||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: kenwood.c,v 1.40 2002-07-10 21:45:44 fillods Exp $
|
||||
* $Id: kenwood.c,v 1.41 2002-09-03 18:53:03 pa4tu 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
|
||||
|
@ -454,6 +454,49 @@ int kenwood_get_freq(RIG *rig, vfo_t vfo, freq_t *freq)
|
|||
return RIG_OK;
|
||||
}
|
||||
|
||||
int kenwood_get_rit(RIG *rig, vfo_t vfo, shortfreq_t * rit)
|
||||
{
|
||||
unsigned char infobuf[50];
|
||||
int info_len, retval;
|
||||
|
||||
retval = kenwood_transaction (rig, "IF;", 3, infobuf, &info_len);
|
||||
if (retval != RIG_OK)
|
||||
return retval;
|
||||
|
||||
if (info_len != 38 || infobuf[1] != 'F') {
|
||||
rig_debug(RIG_DEBUG_ERR,"kenwood_get_rit: wrong answer len=%d\n",
|
||||
info_len);
|
||||
return -RIG_ERJCTED;
|
||||
}
|
||||
|
||||
infobuf[23] = '\0';
|
||||
*rit = atoi(&infobuf[17]);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
int kenwood_set_rit(RIG * rig, vfo_t vfo, shortfreq_t rit)
|
||||
{
|
||||
unsigned char buf[50], infobuf[50], c;
|
||||
int retval, info_len, len, i;
|
||||
|
||||
if (rit == 0)
|
||||
return kenwood_transaction(rig, "RC;", 3, infobuf, &info_len);
|
||||
|
||||
if (rit > 0)
|
||||
c = 'U';
|
||||
else
|
||||
c = 'D';
|
||||
len = sprintf(buf, "R%c;", c);
|
||||
|
||||
retval = kenwood_transaction(rig, "RC;", 3, infobuf, &info_len);
|
||||
for (i = 0; i < abs(round(rit/10)); i++)
|
||||
retval = kenwood_transaction(rig, buf, len, infobuf, &info_len);
|
||||
|
||||
return RIG_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* kenwood_set_mode
|
||||
* Assumes rig!=NULL
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - main header
|
||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: kenwood.h,v 1.23 2002-07-10 21:45:44 fillods Exp $
|
||||
* $Id: kenwood.h,v 1.24 2002-09-03 18:53:17 pa4tu 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
|
||||
|
@ -53,6 +53,8 @@ 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);
|
||||
int kenwood_get_rit(RIG *rig, vfo_t vfo, shortfreq_t * rit);
|
||||
int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width);
|
||||
int kenwood_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width);
|
||||
int kenwood_set_level(RIG *rig, vfo_t vfo, setting_t level, value_t val);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - TS450S description
|
||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts450s.c,v 1.6 2002-08-16 17:43:02 fillods Exp $
|
||||
* $Id: ts450s.c,v 1.7 2002-09-03 18:55:05 pa4tu 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
|
||||
|
@ -150,6 +150,8 @@ const struct rig_caps ts450s_caps = {
|
|||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - TS50 description
|
||||
* Copyright (c) 2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts50s.c,v 1.5 2002-08-16 17:43:02 fillods Exp $
|
||||
* $Id: ts50s.c,v 1.6 2002-09-03 18:55:05 pa4tu 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
|
||||
|
@ -176,6 +176,8 @@ const struct rig_caps ts50s_caps = {
|
|||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - TS570 description
|
||||
* Copyright (c) 2001,2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts570.c,v 1.9 2002-08-16 17:43:02 fillods Exp $
|
||||
* $Id: ts570.c,v 1.10 2002-09-03 18:55:05 pa4tu 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
|
||||
|
@ -185,6 +185,8 @@ const struct rig_caps ts570s_caps = {
|
|||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - TS-790 description
|
||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts790.c,v 1.5 2002-08-16 17:43:02 fillods Exp $
|
||||
* $Id: ts790.c,v 1.6 2002-09-03 18:55:05 pa4tu 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
|
||||
|
@ -165,6 +165,8 @@ const struct rig_caps ts790_caps = {
|
|||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - TS850 description
|
||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts850.c,v 1.4 2002-08-16 17:43:02 fillods Exp $
|
||||
* $Id: ts850.c,v 1.5 2002-09-03 18:55:05 pa4tu 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
|
||||
|
@ -175,6 +175,8 @@ const struct rig_caps ts850_caps = {
|
|||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - TS870S description
|
||||
* Copyright (c) 2000-2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts870s.c,v 1.24 2002-08-16 17:43:02 fillods Exp $
|
||||
* $Id: ts870s.c,v 1.25 2002-09-03 18:55:05 pa4tu 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
|
||||
|
@ -178,6 +178,8 @@ const struct rig_caps ts870s_caps = {
|
|||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Kenwood backend - TS950 description
|
||||
* Copyright (c) 2002 by Stephane Fillod
|
||||
*
|
||||
* $Id: ts950.c,v 1.5 2002-08-16 17:43:02 fillods Exp $
|
||||
* $Id: ts950.c,v 1.6 2002-09-03 18:55:05 pa4tu 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
|
||||
|
@ -150,6 +150,8 @@ const struct rig_caps ts950sdx_caps = {
|
|||
|
||||
.set_freq = kenwood_set_freq,
|
||||
.get_freq = kenwood_get_freq,
|
||||
.set_rit = kenwood_set_rit,
|
||||
.get_rit = kenwood_get_rit,
|
||||
.set_mode = kenwood_set_mode,
|
||||
.get_mode = kenwood_get_mode,
|
||||
.set_vfo = kenwood_set_vfo,
|
||||
|
|
Ładowanie…
Reference in New Issue