kopia lustrzana https://github.com/Hamlib/Hamlib
Several Bug fixes for extra parameter code and documentation added
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2190 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.6.2
rodzic
6fb48baf21
commit
69d32e8f0d
16
icom/ic746.c
16
icom/ic746.c
|
@ -2,7 +2,7 @@
|
||||||
* Hamlib CI-V backend - description of IC-746 and variations
|
* Hamlib CI-V backend - description of IC-746 and variations
|
||||||
* Copyright (c) 2000-2003 by Stephane Fillod
|
* Copyright (c) 2000-2003 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: ic746.c,v 1.9 2006-11-07 12:21:39 n0nb Exp $
|
* $Id: ic746.c,v 1.10 2007-02-28 08:50:19 mardigras Exp $
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Library General Public License as
|
* it under the terms of the GNU Library General Public License as
|
||||||
|
@ -313,7 +313,7 @@ const struct rig_caps ic746_caps = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*IC-746Pro Rig parameters Only available in this namespace*/
|
/* IC-746Pro Rig parameters Only available in this namespace. This is a partial list */
|
||||||
#define S_MEM_SC_LEN 2 /* 756PRO S_MEM subcmd length */
|
#define S_MEM_SC_LEN 2 /* 756PRO S_MEM subcmd length */
|
||||||
#define S_MEM_LCD_CONT 0x501 /* LCD Contrast 0-256/0-100% */
|
#define S_MEM_LCD_CONT 0x501 /* LCD Contrast 0-256/0-100% */
|
||||||
#define S_MEM_BKLIT 0x502 /* Backlight 0-256/0-100% */
|
#define S_MEM_BKLIT 0x502 /* Backlight 0-256/0-100% */
|
||||||
|
@ -348,7 +348,7 @@ static const struct confparams ic746pro_ext_parms[] = {
|
||||||
NULL, RIG_CONF_COMBO, { .c = {{ "Auto", "Sql", "RF+Sql", NULL }} }
|
NULL, RIG_CONF_COMBO, { .c = {{ "Auto", "Sql", "RF+Sql", NULL }} }
|
||||||
},
|
},
|
||||||
{ TOK_RTTY_FLTR, "rttyfltr", "RTTY Fltr Width preset", "Set/Read RTTY preset filter width",
|
{ TOK_RTTY_FLTR, "rttyfltr", "RTTY Fltr Width preset", "Set/Read RTTY preset filter width",
|
||||||
"3", RIG_CONF_COMBO, { .c = {{"250", "300", "350", "500", "1000", NULL }} }
|
"350", RIG_CONF_COMBO, { .c = {{"250", "300", "350", "500", "1000", NULL }} }
|
||||||
},
|
},
|
||||||
{ RIG_CONF_END, NULL, }
|
{ RIG_CONF_END, NULL, }
|
||||||
};
|
};
|
||||||
|
@ -356,7 +356,7 @@ static const struct confparams ic746pro_ext_parms[] = {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NUMERIC: val.f
|
* NUMERIC: val.f
|
||||||
* COMBO: val.i, starting from 0
|
* COMBO: val.i, starting from 0 Index to a string table.
|
||||||
* STRING: val.cs for set, val.s for get
|
* STRING: val.cs for set, val.s for get
|
||||||
* CHECKBUTTON: val.i 0/1
|
* CHECKBUTTON: val.i 0/1
|
||||||
*/
|
*/
|
||||||
|
@ -574,9 +574,9 @@ static int ic746pro_set_ext_parm(RIG *rig, token_t token, value_t val)
|
||||||
icom_val = val.i;
|
icom_val = val.i;
|
||||||
break;
|
break;
|
||||||
case TOK_RTTY_FLTR: /* RTTY filter mode 0 - 4 = 250, 300, 350, 500, 1000 */
|
case TOK_RTTY_FLTR: /* RTTY filter mode 0 - 4 = 250, 300, 350, 500, 1000 */
|
||||||
if (val.f < 0 || val.f > 4) return -RIG_EINVAL;
|
if (val.i < 0 || val.i > 4) return -RIG_EINVAL;
|
||||||
ep_sc = S_MEM_RTTY_FL_PB;
|
ep_sc = S_MEM_RTTY_FL_PB;
|
||||||
icom_val = val.f;
|
icom_val = val.i;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
|
@ -664,6 +664,7 @@ static int ic746pro_get_ext_parm(RIG *rig, token_t token, value_t *val)
|
||||||
case RIG_CONF_STRING:
|
case RIG_CONF_STRING:
|
||||||
memcpy(val->s, resbuf, res_len);
|
memcpy(val->s, resbuf, res_len);
|
||||||
break;
|
break;
|
||||||
|
case RIG_CONF_CHECKBUTTON:
|
||||||
case RIG_CONF_COMBO:
|
case RIG_CONF_COMBO:
|
||||||
val->i = from_bcd_be(resbuf+cmdhead, res_len*2);
|
val->i = from_bcd_be(resbuf+cmdhead, res_len*2);
|
||||||
break;
|
break;
|
||||||
|
@ -675,9 +676,6 @@ static int ic746pro_get_ext_parm(RIG *rig, token_t token, value_t *val)
|
||||||
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
|
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
|
||||||
return -RIG_EPROTO;
|
return -RIG_EPROTO;
|
||||||
|
|
||||||
/* The examples of code usage for RIG_CONF_NUMERIC types seems to be restricted to raw floating
|
|
||||||
point values. Although the Val definitions allow both integer and floating point types The combo
|
|
||||||
types appear to be left in undecoded form*/
|
|
||||||
}
|
}
|
||||||
rig_debug(RIG_DEBUG_TRACE,"%s: %d %d %d %f\n",
|
rig_debug(RIG_DEBUG_TRACE,"%s: %d %d %d %f\n",
|
||||||
__FUNCTION__, res_len, icom_val, val->i, val->f);
|
__FUNCTION__, res_len, icom_val, val->i, val->f);
|
||||||
|
|
10
icom/ic756.c
10
icom/ic756.c
|
@ -2,7 +2,7 @@
|
||||||
* Hamlib CI-V backend - description of IC-756 and variations
|
* Hamlib CI-V backend - description of IC-756 and variations
|
||||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: ic756.c,v 1.15 2006-10-07 20:13:21 csete Exp $
|
* $Id: ic756.c,v 1.16 2007-02-28 08:50:20 mardigras Exp $
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Library General Public License as
|
* it under the terms of the GNU Library General Public License as
|
||||||
|
@ -397,7 +397,7 @@ static const struct confparams ic756pro2_ext_parms[] = {
|
||||||
NULL, RIG_CONF_STRING, { }
|
NULL, RIG_CONF_STRING, { }
|
||||||
},
|
},
|
||||||
{ TOK_RTTY_FLTR, "rttyfltr", "RTTY Fltr Width preset", "Set/Read RTTY preset filter width",
|
{ TOK_RTTY_FLTR, "rttyfltr", "RTTY Fltr Width preset", "Set/Read RTTY preset filter width",
|
||||||
"3", RIG_CONF_COMBO, { .c = {{"250", "300", "350", "500", "1000", NULL }} }
|
"350", RIG_CONF_COMBO, { .c = {{"250", "300", "350", "500", "1000", NULL }} }
|
||||||
},
|
},
|
||||||
{ RIG_CONF_END, NULL, }
|
{ RIG_CONF_END, NULL, }
|
||||||
};
|
};
|
||||||
|
@ -618,7 +618,7 @@ static int ic756pro2_set_ext_parm(RIG *rig, token_t token, value_t val)
|
||||||
case TOK_RTTY_FLTR: /* RTTY filter mode 0 - 4 = 250, 300, 350, 500, 1000 */
|
case TOK_RTTY_FLTR: /* RTTY filter mode 0 - 4 = 250, 300, 350, 500, 1000 */
|
||||||
if (val.i < 0 || val.i > 4) return -RIG_EINVAL;
|
if (val.i < 0 || val.i > 4) return -RIG_EINVAL;
|
||||||
ep_sc = S_MEM_RTTY_FL_PB;
|
ep_sc = S_MEM_RTTY_FL_PB;
|
||||||
icom_val = val.f;
|
icom_val = val.i;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -RIG_EINVAL;
|
return -RIG_EINVAL;
|
||||||
|
@ -712,6 +712,7 @@ static int ic756pro2_get_ext_parm(RIG *rig, token_t token, value_t *val)
|
||||||
case RIG_CONF_STRING:
|
case RIG_CONF_STRING:
|
||||||
memcpy(val->s, resbuf, res_len);
|
memcpy(val->s, resbuf, res_len);
|
||||||
break;
|
break;
|
||||||
|
case RIG_CONF_CHECKBUTTON:
|
||||||
case RIG_CONF_COMBO:
|
case RIG_CONF_COMBO:
|
||||||
val->i = from_bcd_be(resbuf+cmdhead, res_len*2);
|
val->i = from_bcd_be(resbuf+cmdhead, res_len*2);
|
||||||
break;
|
break;
|
||||||
|
@ -723,9 +724,6 @@ static int ic756pro2_get_ext_parm(RIG *rig, token_t token, value_t *val)
|
||||||
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
|
"len=%d\n", __FUNCTION__,resbuf[0],res_len);
|
||||||
return -RIG_EPROTO;
|
return -RIG_EPROTO;
|
||||||
|
|
||||||
/* The examples of code usage for RIG_CONF_NUMERIC types seems to be restricted to raw floating
|
|
||||||
point values. Although the Val definitions allow both integer and floating point types The combo
|
|
||||||
types appear to be left in undecoded form*/
|
|
||||||
}
|
}
|
||||||
rig_debug(RIG_DEBUG_TRACE,"%s: %d %d %d %f\n",
|
rig_debug(RIG_DEBUG_TRACE,"%s: %d %d %d %f\n",
|
||||||
__FUNCTION__, res_len, icom_val, val->i, val->f);
|
__FUNCTION__, res_len, icom_val, val->i, val->f);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Hamlib CI-V backend - main file
|
* Hamlib CI-V backend - main file
|
||||||
* Copyright (c) 2000-2005 by Stephane Fillod
|
* Copyright (c) 2000-2005 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: icom.c,v 1.100 2007-01-27 23:50:13 n0nb Exp $
|
* $Id: icom.c,v 1.101 2007-02-28 08:50:20 mardigras Exp $
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Library General Public License as
|
* it under the terms of the GNU Library General Public License as
|
||||||
|
@ -578,7 +578,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
|
||||||
|
|
||||||
/* Most rigs return 1-wide, 2-normal,3-narrow For DSP rigs these are presets, can be programmed for 30 - 41 bandwidths, depending on mode Lets check for dsp filters */
|
/* Most rigs return 1-wide, 2-normal,3-narrow For DSP rigs these are presets, can be programmed for 30 - 41 bandwidths, depending on mode Lets check for dsp filters */
|
||||||
|
|
||||||
if ((retval = icom_get_dsp_flt(rig, *mode)))
|
if ((retval = icom_get_dsp_flt(rig, *mode)) !=0)
|
||||||
*width = retval;
|
*width = retval;
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Hamlib CI-V backend - main header
|
* Hamlib CI-V backend - main header
|
||||||
* Copyright (c) 2000-2004 by Stephane Fillod
|
* Copyright (c) 2000-2004 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: icom.h,v 1.74 2006-11-07 12:21:39 n0nb Exp $
|
* $Id: icom.h,v 1.75 2007-02-28 08:50:20 mardigras Exp $
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Library General Public License as
|
* it under the terms of the GNU Library General Public License as
|
||||||
|
@ -122,7 +122,7 @@ extern const struct ts_sc_list ic7000_ts_sc_list[];
|
||||||
extern const struct ts_sc_list ic910_ts_sc_list[];
|
extern const struct ts_sc_list ic910_ts_sc_list[];
|
||||||
extern const struct ts_sc_list ic718_ts_sc_list[];
|
extern const struct ts_sc_list ic718_ts_sc_list[];
|
||||||
|
|
||||||
extern const pbwidth_t rtty_fil[]; /* rtty filter passband width; available on pro rigs */
|
extern const pbwidth_t rtty_fil[]; /* rtty filter passband width; available on 746pro and 756pro rigs */
|
||||||
|
|
||||||
pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode);
|
pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Hamlib Interface - API header
|
* Hamlib Interface - API header
|
||||||
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
|
* Copyright (c) 2000-2005 by Stephane Fillod and Frank Singleton
|
||||||
*
|
*
|
||||||
* $Id: rig.h,v 1.120 2006-11-07 12:21:39 n0nb Exp $
|
* $Id: rig.h,v 1.121 2007-02-28 08:52:49 mardigras Exp $
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Library General Public License as
|
* it under the terms of the GNU Library General Public License as
|
||||||
|
@ -439,8 +439,8 @@ typedef enum {
|
||||||
RIG_OP_FROM_VFO = (1<<2), /*!< VFO->MEM */
|
RIG_OP_FROM_VFO = (1<<2), /*!< VFO->MEM */
|
||||||
RIG_OP_TO_VFO = (1<<3), /*!< MEM->VFO */
|
RIG_OP_TO_VFO = (1<<3), /*!< MEM->VFO */
|
||||||
RIG_OP_MCL = (1<<4), /*!< Memory clear */
|
RIG_OP_MCL = (1<<4), /*!< Memory clear */
|
||||||
RIG_OP_UP = (1<<5), /*!< UP */
|
RIG_OP_UP = (1<<5), /*!< UP increment VFO freq by tuning step*/
|
||||||
RIG_OP_DOWN = (1<<6), /*!< DOWN */
|
RIG_OP_DOWN = (1<<6), /*!< DOWN decrement VFO freq by tuning step*/
|
||||||
RIG_OP_BAND_UP = (1<<7), /*!< Band UP */
|
RIG_OP_BAND_UP = (1<<7), /*!< Band UP */
|
||||||
RIG_OP_BAND_DOWN = (1<<8), /*!< Band DOWN */
|
RIG_OP_BAND_DOWN = (1<<8), /*!< Band DOWN */
|
||||||
RIG_OP_LEFT = (1<<9), /*!< LEFT */
|
RIG_OP_LEFT = (1<<9), /*!< LEFT */
|
||||||
|
@ -473,13 +473,23 @@ typedef long token_t;
|
||||||
#define RIG_CONF_END 0
|
#define RIG_CONF_END 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Configuration parameter types
|
* \brief parameter types
|
||||||
|
*
|
||||||
|
* Used with configuration, parameter and extra-parm tables.
|
||||||
|
*
|
||||||
|
* Current internal implementation
|
||||||
|
* NUMERIC: val.f or val.i
|
||||||
|
* COMBO: val.i, starting from 0. Points to a table of strings or asci stored values.
|
||||||
|
* STRING: val.s or val.cs
|
||||||
|
* CHECKBUTTON: val.i 0/1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* strongly inspired from soundmedem. Thanks Thomas! */
|
/* strongly inspired from soundmedem. Thanks Thomas! */
|
||||||
|
|
||||||
enum rig_conf_e {
|
enum rig_conf_e {
|
||||||
RIG_CONF_STRING, /*!< String type */
|
RIG_CONF_STRING, /*!< String type */
|
||||||
RIG_CONF_COMBO, /*!< Combo type */
|
RIG_CONF_COMBO, /*!< Combo type */
|
||||||
RIG_CONF_NUMERIC, /*!< Numeric type (integer or real) */
|
RIG_CONF_NUMERIC, /*!< Numeric type integer or real */
|
||||||
RIG_CONF_CHECKBUTTON /*!< on/off type */
|
RIG_CONF_CHECKBUTTON /*!< on/off type */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue