Mike Black W9MDB 2023-08-17 16:04:45 -05:00
rodzic beb69f752a
commit e887152407
35 zmienionych plików z 284 dodań i 61 usunięć

Wyświetl plik

@ -1146,7 +1146,7 @@ enum multicast_item_e {
};
//! @cond Doxygen_Suppress
#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT)
#define RIG_PARM_FLOAT_LIST (RIG_PARM_BACKLIGHT|RIG_PARM_BAT|RIG_PARM_KEYLIGHT|RIG_PARM_BACKLIGHT)
#define RIG_PARM_STRING_LIST (RIG_PARM_BANDSELECT)
#define RIG_PARM_READONLY_LIST (RIG_PARM_BAT)

Wyświetl plik

@ -137,6 +137,7 @@
struct cmdparams ic7000_extcmds[] =
{
{ {.s = RIG_LEVEL_VOXDELAY}, CMD_PARAM_TYPE_LEVEL, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x17}, CMD_DAT_INT, 1 },
{ {.s = RIG_PARM_TIME}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x41}, CMD_DAT_TIM, 2 },
{ {.s = RIG_PARM_NONE} }
};
@ -226,7 +227,14 @@ const struct rig_caps ic7000_caps =
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}},
[PARM_APO] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ctcss_list = common_ctcss_list,
.dcs_list = common_dcs_list,
.preamp = { 10, RIG_DBLST_END, }, /* FIXME: TBC it's a guess */
@ -345,8 +353,8 @@ const struct rig_caps ic7000_caps =
.get_level = icom_get_level,
.set_func = icom_set_func,
.get_func = icom_get_func,
.set_parm = NULL,
.get_parm = NULL,
.set_parm = icom_set_parm,
.get_parm = icom_get_parm,
.set_mem = icom_set_mem,
.set_bank = icom_set_bank,
.vfo_op = icom_vfo_op,

Wyświetl plik

@ -98,7 +98,9 @@
RIG_LEVEL_NB | \
RIG_LEVEL_AGC_TIME)
#define IC7100_PARM_ALL (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_KEYLIGHT|RIG_PARM_BEEP|RIG_PARM_TIME|RIG_PARM_BANDSELECT)
//#define IC7100_PARM_ALL (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_KEYLIGHT|RIG_PARM_BEEP|RIG_PARM_TIME|RIG_PARM_BANDSELECT)
// BANDSELECT disabled unti we figure out Icom's ability
#define IC7100_PARM_ALL (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_KEYLIGHT|RIG_PARM_BEEP|RIG_PARM_TIME)
int ic7100_tokens[] = { TOK_DSTAR_CODE, TOK_DSTAR_DSQL, TOK_DSTAR_CALL_SIGN, TOK_DSTAR_MESSAGE,
TOK_DSTAR_STATUS, TOK_DSTAR_MY_CS, TOK_DSTAR_TX_CS, TOK_DSTAR_TX_MESS,
@ -347,8 +349,16 @@ const struct rig_caps ic7100_caps =
.extfuncs = icom_ext_funcs,
.extparms = icom_ext_parms,
.parm_gran = {
[PARM_BANDSELECT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.s = "BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BAND2M,BAND70CM,BANDGEN"}}
},
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_KEYLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
[PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
[PARM_APO] = { .min = { .i = 1 }, .max = { .i = 1439} },
},
.ctcss_list = common_ctcss_list,
.dcs_list = common_dcs_list,
.preamp = { 1, 2, RIG_DBLST_END, },

Wyświetl plik

@ -155,7 +155,15 @@ const struct rig_caps ic7200_caps =
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
[PARM_APO] = { .min = { .i = 1 }, .max = { .i = 1439} },
},
.ctcss_list = NULL,
.dcs_list = NULL,
.preamp = { 10, RIG_DBLST_END, }, /* FIXME: TBC it's a guess */

Wyświetl plik

@ -223,6 +223,7 @@ int ic9700_set_vfo(RIG *rig, vfo_t vfo);
struct cmdparams ic7300_extcmds[] =
{
{ {.s = RIG_PARM_ANN}, CMD_PARAM_TYPE_PARM, C_CTL_ANN, 0, SC_MOD_WR, 0, {0x00}, CMD_DAT_INT, 1 },
{ {.s = RIG_PARM_BEEP}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x23}, CMD_DAT_BOL, 1 },
{ {.s = RIG_PARM_BACKLIGHT}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x81}, CMD_DAT_LVL, 2 },
{ {.s = RIG_PARM_SCREENSAVER}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x89}, CMD_DAT_INT, 1 },
@ -238,6 +239,7 @@ struct cmdparams ic7300_extcmds[] =
struct cmdparams ic9700_extcmds[] =
{
{ {.s = RIG_PARM_ANN}, CMD_PARAM_TYPE_PARM, C_CTL_ANN, 0, SC_MOD_WR, 0, {0x00}, CMD_DAT_INT, 1 },
{ {.s = RIG_PARM_BEEP}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x29}, CMD_DAT_BOL, 1 },
{ {.s = RIG_PARM_BACKLIGHT}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x52}, CMD_DAT_LVL, 2 },
{ {.s = RIG_PARM_SCREENSAVER}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x67}, CMD_DAT_INT, 1 },
@ -252,6 +254,7 @@ struct cmdparams ic9700_extcmds[] =
struct cmdparams ic705_extcmds[] =
{
{ {.s = RIG_PARM_ANN}, CMD_PARAM_TYPE_PARM, C_CTL_ANN, 0, SC_MOD_WR, 0, {0x00}, CMD_DAT_INT, 1 },
{ {.s = RIG_PARM_BEEP}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x00, 0x31}, CMD_DAT_BOL, 1 },
{ {.s = RIG_PARM_BACKLIGHT}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x36}, CMD_DAT_LVL, 2 },
{ {.s = RIG_PARM_SCREENSAVER}, CMD_PARAM_TYPE_PARM, C_CTL_MEM, S_MEM_PARM, SC_MOD_RW, 2, {0x01, 0x38}, CMD_DAT_INT, 1 },
@ -715,7 +718,12 @@ const struct rig_caps ic7300_caps =
[LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }},
},
.parm_gran = {
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}}
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
[PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}},
},
.ext_tokens = ic7300_ext_tokens,
.extlevels = icom_ext_levels,
@ -953,7 +961,10 @@ struct rig_caps ic9700_caps =
[LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }},
},
.parm_gran = {
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM"}}
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}},
[PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}}
},
.ext_tokens = ic9700_ext_tokens,
.extlevels = icom_ext_levels,
@ -1269,7 +1280,10 @@ const struct rig_caps ic705_caps =
[LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }},
},
.parm_gran = {
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDWFM,BANDAIR,BAND70CM,BAND33CM,BANDGEN"}}
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDWFM,BANDAIR,BAND70CM,BAND33CM,BANDGEN"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}},
[PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
},
.ext_tokens = ic705_ext_tokens,
.extlevels = icom_ext_levels,
@ -1538,7 +1552,10 @@ const struct rig_caps ic905_caps =
[LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }},
},
.parm_gran = {
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM,BAND23CM,BAND13CM,BAND3CM"}}
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND70CM,BAND33CM,BAND23CM,BAND23CM,BAND13CM,BAND3CM"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}},
[PARM_SCREENSAVER] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
},
.ext_tokens = ic705_ext_tokens,
.extlevels = icom_ext_levels,
@ -1857,8 +1874,10 @@ int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val)
switch (parm)
{
#if 0
case RIG_PARM_ANN:
return -RIG_ENIMPL; // How can we implement this?
#endif
default:
rig_debug(RIG_DEBUG_TRACE, "%s: using icom routine for PARM=%s\n", __func__,
@ -1887,9 +1906,11 @@ int ic7300_get_parm(RIG *rig, setting_t parm, value_t *val)
switch (parm)
{
#if 0
case RIG_PARM_ANN:
rig_debug(RIG_DEBUG_WARN, "%s: not implemented\n", __func__);
return -RIG_ENIMPL;
#endif
default:
return icom_get_parm(rig, parm, val);

Wyświetl plik

@ -154,7 +154,11 @@ const struct rig_caps ic7410_caps =
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ctcss_list = common_ctcss_list,
.dcs_list = NULL,
.preamp = { 10, 20, RIG_DBLST_END, }, /* FIXME: TBC */

Wyświetl plik

@ -446,7 +446,12 @@ const struct rig_caps ic746pro_caps =
#include "level_gran_icom.h"
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.extparms = ic746pro_ext_parms,
.ctcss_list = common_ctcss_list,
.dcs_list = full_dcs_list,

Wyświetl plik

@ -1014,7 +1014,13 @@ const struct rig_caps ic756pro3_caps =
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.extparms = ic756pro2_ext_parms,
.ctcss_list = common_ctcss_list,
.dcs_list = NULL,

Wyświetl plik

@ -308,7 +308,15 @@ struct rig_caps ic7600_caps =
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_KEYLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
[PARM_APO] = { .min = { .i = 1 }, .max = { .i = 1439} },
},
.ext_tokens = ic7600_ext_tokens,
.extfuncs = icom_ext_funcs,
.extlevels = icom_ext_levels,

Wyświetl plik

@ -392,7 +392,14 @@ struct rig_caps ic7610_caps =
[LVL_SPECTRUM_AVG] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
[LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }},
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ext_tokens = ic7610_ext_tokens,
.extlevels = icom_ext_levels,
.ctcss_list = common_ctcss_list,

Wyświetl plik

@ -290,7 +290,12 @@ const struct rig_caps ic7700_caps =
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ext_tokens = ic7700_ext_tokens,
.ctcss_list = common_ctcss_list,
.dcs_list = NULL,

Wyświetl plik

@ -187,7 +187,12 @@ const struct rig_caps ic7800_caps =
[LVL_KEYSPD] = { .min = { .i = 6 }, .max = { .i = 48 }, .step = { .i = 1 } },
[LVL_CWPITCH] = { .min = { .i = 300 }, .max = { .i = 900 }, .step = { .i = 1 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ext_tokens = ic7800_ext_tokens,
.ctcss_list = common_ctcss_list,
.dcs_list = NULL,

Wyświetl plik

@ -276,7 +276,14 @@ const struct rig_caps ic785x_caps =
[LVL_SPECTRUM_AVG] = {.min = {.i = 0}, .max = {.i = 3}, .step = {.i = 1}},
[LVL_USB_AF] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f }},
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ext_tokens = ic785x_ext_tokens,
.extlevels = icom_ext_levels,
.ctcss_list = common_ctcss_list,

Wyświetl plik

@ -138,7 +138,12 @@ const struct rig_caps ic9100_caps =
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
[LVL_VOXDELAY] = { .min = { .i = 0 }, .max = { .i = 20 }, .step = { .i = 1 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ctcss_list = common_ctcss_list,
.dcs_list = common_dcs_list,
.preamp = {20, RIG_DBLST_END, },

Wyświetl plik

@ -9412,7 +9412,12 @@ int icom_get_raw_buf(RIG *rig, int cmd, int subcmd, int subcmdbuflen,
cmdhead += (subcmd == -1) ? 1 : 2;
ack_len -= cmdhead;
rig_debug(RIG_DEBUG_TRACE, "%s: %d\n", __func__, ack_len);
rig_debug(RIG_DEBUG_TRACE, "%s: ack_len=%d\n", __func__, ack_len);
if (ack_len < 0)
{
RETURNFUNC(-RIG_EPROTO);
}
if (*reslen < ack_len || res == NULL)
{

Wyświetl plik

@ -35,7 +35,7 @@
#include <sys/time.h>
#endif
#define BACKEND_VER "20230729"
#define BACKEND_VER "20230817"
#define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31)
#define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)

Wyświetl plik

@ -81,7 +81,14 @@ const struct rig_caps icr7000_caps =
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE,
.level_gran = {},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_TIME] = {.min = {.i = 0}, .max = {.i = 86399}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ctcss_list = NULL,
.dcs_list = NULL,
.preamp = { RIG_DBLST_END, },

Wyświetl plik

@ -74,7 +74,11 @@ const struct rig_caps icr72_caps =
.has_get_parm = RIG_PARM_ANN,
.has_set_parm = RIG_PARM_ANN,
.level_gran = {}, /* granularity */
.parm_gran = {},
.parm_gran = {
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ctcss_list = NULL,
.dcs_list = NULL,
.preamp = { RIG_DBLST_END, },

Wyświetl plik

@ -144,7 +144,12 @@ const struct rig_caps icr75_caps =
.parm_gran = {
[PARM_APO] = { .min = { .i = 1 }, .max = { .i = 1439} },
[PARM_TIME] = { .min = { .i = 0 }, .max = { .i = 86399} },
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_BEEP] = {.min = {.i = 0}, .max = {.i = 1}, .step = {.i = 1}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ctcss_list = NULL,
.dcs_list = NULL,
.preamp = { 10, 20, RIG_DBLST_END, }, /* TBC */

Wyświetl plik

@ -97,7 +97,11 @@ const struct rig_caps icr9000_caps =
// cppcheck-suppress *
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ctcss_list = NULL,
.dcs_list = NULL,
.preamp = { RIG_DBLST_END },

Wyświetl plik

@ -111,7 +111,12 @@ const struct rig_caps icr9500_caps =
// cppcheck-suppress *
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
},
.parm_gran = {},
.parm_gran = {
[PARM_BACKLIGHT] = {.min = {.f = 0.0f}, .max = {.f = 1.0f}, .step = {.f = 1.0f / 255.0f}},
[PARM_BANDSELECT] = {.step = {.s = "BANDUNUSED,BAND160M,BAND80M,BAND40M,BAND30M,BAND20M,BAND17M,BAND15M,BAND12M,BAND10M,BAND6M,BANDGEN"}},
[PARM_ANN] = {.min = {.i = 0}, .max = {.i = 2}, .step = {.i = 1}},
},
.ctcss_list = common_ctcss_list,
.dcs_list = common_dcs_list,
.preamp = { 10, 20, RIG_DBLST_END }, /* FIXME: TBC */

Wyświetl plik

@ -53,7 +53,7 @@
#define X108G_LEVELS (RIG_LEVEL_PREAMP|RIG_LEVEL_ATT|RIG_LEVEL_AGC|RIG_LEVEL_COMP|RIG_LEVEL_BKINDL|RIG_LEVEL_NR|RIG_LEVEL_PBT_IN|RIG_LEVEL_PBT_OUT|RIG_LEVEL_CWPITCH|RIG_LEVEL_RFPOWER|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_NOTCHF_RAW|RIG_LEVEL_SQL|RIG_LEVEL_RAWSTR|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_VOXGAIN|RIG_LEVEL_VOXDELAY|RIG_LEVEL_SWR|RIG_LEVEL_ALC)
#define X108G_VFOS (RIG_VFO_A|RIG_VFO_B|RIG_VFO_MEM)
#define X108G_PARMS (RIG_PARM_ANN|RIG_PARM_BACKLIGHT|RIG_PARM_APO|RIG_PARM_TIME|RIG_PARM_BEEP)
#define X108G_PARMS (RIG_PARM_BACKLIGHT|RIG_PARM_APO|RIG_PARM_TIME|RIG_PARM_BEEP)
#define X108G_VFO_OPS (RIG_OP_CPY|RIG_OP_XCHG|RIG_OP_FROM_VFO|RIG_OP_TO_VFO|RIG_OP_MCL|RIG_OP_TUNE)
#define X108G_SCAN_OPS (RIG_SCAN_MEM|RIG_SCAN_PROG|RIG_SCAN_SLCT|RIG_SCAN_PRIO)

Wyświetl plik

@ -48,6 +48,8 @@ int agc_time = 1;
int ovf_status = 0;
int powerstat = 1;
int transceive = 0;
int keyspd = 20;
int rigtime = 1230;
void dumphex(unsigned char *buf, int n)
{
@ -73,11 +75,13 @@ again:
if (c == 0xfd)
{
char mytime[256];
date_strget(mytime,sizeof(mytime),1);
date_strget(mytime, sizeof(mytime), 1);
printf("%s:", mytime); dumphex(buf, i);
// echo
n = write(fd, buf, i);
if (n != i) printf("%s: error on write: %s\n", __func__, strerror(errno));
if (n != i) { printf("%s: error on write: %s\n", __func__, strerror(errno)); }
return i;
}
@ -281,10 +285,32 @@ void frameParse(int fd, unsigned char *frame, int len)
frame[8] = 0xfd;
n = write(fd, frame, 9);
break;
case 0x0c:
dumphex(frame, 10);
printf("subcmd=0x0c #1\n");
if (frame[6] != 0xfd) // then we have data
{
printf("subcmd=0x0c #1\n");
keyspd = from_bcd(&frame[6], 2);
frame[6] = 0xfb;
n = write(fd, frame, 7);
}
else
{
printf("subcmd=0x0c #1\n");
to_bcd(&frame[6], keyspd, 2);
frame[8] = 0xfd;
n = write(fd, frame, 9);
}
break;
}
break;
case 0x15:
switch (frame[5])
{
@ -369,14 +395,47 @@ void frameParse(int fd, unsigned char *frame, int len)
case 0x05:
// FE FE 70 E0 1A 05 00 92 00 FD
printf("0x05 received\n");
if (frame[6] == 0x00 && frame[7] == 0x92 && frame[8] == 0x00)
if (frame[6] == 0x00 && frame[7] == 0x92)
{
printf("0x05 0x00 0x92 received\n");
transceive = frame[8];
frame[6] = 0xfb;
frame[7] = 0xfd;
n = write(fd, frame, 8);
if (frame[8] == 0x00)
{
printf("0x05 0x00 0x92 received\n");
transceive = frame[8];
frame[6] = 0xfb;
frame[7] = 0xfd;
n = write(fd, frame, 8);
}
else
{
frame[8] = transceive;
frame[9] = 0xfb;
frame[10] = 0xfd;
n = write(fd, frame, 11);
}
}
// FE FE 70 E0 1A 05 00 41 00 FD
else if (frame[6] == 0x00 && frame[7] == 0x41)
{
if (frame[8] != 0xfd)
{
printf("0x05 0x00 0x41 received\n");
rigtime = frame[8] * 100 + frame[9];
frame[6] = 0xfb;
frame[7] = 0xfd;
n = write(fd, frame, 8);
}
else
{
frame[8] = rigtime / 100;
frame[9] = rigtime % 100;
frame[10] = 0xfd;
n = write(fd, frame, 11);
}
}
break;
case 0x06: // Data mode
if (frame[6] == 0xfd) // then we're replying with mode
{

Wyświetl plik

@ -310,7 +310,7 @@ void frameParse(int fd, unsigned char *frame, int len)
frame[8] = 0xfd;
n = write(fd, frame, 9);
break;
case 0x07:
frame[6] = ovf_status;
frame[7] = 0xfd;

Wyświetl plik

@ -47,6 +47,7 @@ int satmode = 0;
int agc_time = 1;
int ovf_status = 0;
int powerstat = 1;
int keyspd = 20;
void dumphex(unsigned char *buf, int n)
{
@ -72,11 +73,13 @@ again:
if (c == 0xfd)
{
char mytime[256];
date_strget(mytime,sizeof(mytime),1);
date_strget(mytime, sizeof(mytime), 1);
printf("%s:", mytime); dumphex(buf, i);
// echo
n = write(fd, buf, i);
if (n != i) printf("%s: error on write: %s\n", __func__, strerror(errno));
if (n != i) { printf("%s: error on write: %s\n", __func__, strerror(errno)); }
return i;
}
@ -200,7 +203,7 @@ void frameParse(int fd, unsigned char *frame, int len)
frame[4] = 0xfb;
frame[5] = 0xfd;
hl_usleep(20*1000);
hl_usleep(20 * 1000);
n = write(fd, frame, 6);
break;
@ -280,9 +283,30 @@ void frameParse(int fd, unsigned char *frame, int len)
to_bcd(&frame[6], (long long)power_level, 2);
frame[8] = 0xfd;
n = write(fd, frame, 9);
break;
case 0x0c:
dumphex(frame, 10);
printf("subcmd=0x0c #1\n");
if (frame[6] != 0xfd) // then we have data
{
printf("subcmd=0x0c #1\n");
keyspd = from_bcd(&frame[6], 2);
frame[6] = 0xfb;
n = write(fd, frame, 7);
}
else
{
printf("subcmd=0x0c #1\n");
to_bcd(&frame[6], keyspd, 2);
frame[8] = 0xfd;
n = write(fd, frame, 9);
}
break;
}
break;
case 0x15:

Wyświetl plik

@ -31,7 +31,7 @@ int civ_731_mode = 0;
vfo_t current_vfo = RIG_VFO_A;
int split = 0;
int keyspd = 85; // 85=20WPM
int band=8;
int band = 8;
// we make B different from A to ensure we see a difference at startup
float freqA = 14074000;
@ -311,7 +311,7 @@ void frameParse(int fd, unsigned char *frame, int len)
frame[8] = 0xfd;
n = write(fd, frame, 9);
break;
case 0x07:
frame[6] = ovf_status;
frame[7] = 0xfd;
@ -371,17 +371,19 @@ void frameParse(int fd, unsigned char *frame, int len)
{
frame[6] = band;
frame[7] = 0xfd;
n = write(fd,frame,8);
n = write(fd, frame, 8);
}
else
{
band = frame[6];
printf("Band select=%d\n",band);
printf("Band select=%d\n", band);
frame[4] = 0xfb;
frame[5] = 0xfe;
n = write(fd,frame,6);
n = write(fd, frame, 6);
}
break;
case 0x03: // width
if (current_vfo == RIG_VFO_A || current_vfo == RIG_VFO_MAIN) { frame[6] = widthA; }
else { frame[6] = widthB; }

Wyświetl plik

@ -7,9 +7,9 @@
#define _XOPEN_SOURCE 700
// since we are POSIX here we need this
struct ip_mreq
{
{
int dummy;
};
};
#include <stdio.h>
#include <stdlib.h>
@ -377,7 +377,9 @@ void frameParse(int fd, unsigned char *frame, int len)
frame[5] = 0xfd;
n = write(fd, frame, 6);
}
break;
case 0x07: // satmode
frame[4] = 0;
frame[7] = 0xfd;

Wyświetl plik

@ -238,7 +238,8 @@ void frameParse(int fd, unsigned char *frame, int len)
break;
case 0x14:
printf("******** 0x14 received frame[5]=0x%02x\n", frame[5]);
printf("******** 0x14 received frame[5]=0x%02x\n", frame[5]);
switch (frame[5])
{
static int power_level = 0;
@ -285,9 +286,11 @@ void frameParse(int fd, unsigned char *frame, int len)
frame[7] = 0xfd;
n = write(fd, frame, 8);
}
break;
default:
printf("*********** NAK\n");
printf("*********** NAK\n");
frame[5] = 0xfa;
frame[6] = 0xfd;
n = write(fd, frame, 7);

Wyświetl plik

@ -190,11 +190,13 @@ void frameParse(int fd, unsigned char *frame, int len)
case 0x07:
printf("******* [5] = 0x07\n");
printf("******* [5] = 0x07\n");
switch (frame[5])
{
case 0xd2:
printf("******* [6] = 0x07\n");
printf("******* [6] = 0x07\n");
switch (frame[6])
{
case 0x00: current_vfo = RIG_VFO_MAIN; break;
@ -247,8 +249,9 @@ printf("******* [6] = 0x07\n");
frame[7] = 0xfd;
n = write(fd, frame, 8);
}
break;
case 0x12: // we're simulating the 3-byte version -- not the 2-byte
if (frame[5] != 0xfd)

Wyświetl plik

@ -7,9 +7,9 @@
#define _XOPEN_SOURCE 700
// since we are POSIX here we need this
struct ip_mreq
{
{
int dummy;
};
};
#include <stdio.h>
#include <stdlib.h>

Wyświetl plik

@ -7,9 +7,9 @@
#define _XOPEN_SOURCE 700
// since we are POSIX here we need this
struct ip_mreq
{
{
int dummy;
};
};
#include <hamlib/rig.h>
#include <stdio.h>
#include <stdlib.h>

Wyświetl plik

@ -7,9 +7,9 @@
#define _XOPEN_SOURCE 700
// since we are POSIX here we need this
struct ip_mreq
{
{
int dummy;
};
};
#include <stdio.h>
#include <stdlib.h>

Wyświetl plik

@ -7,9 +7,9 @@
#define _XOPEN_SOURCE 700
// since we are POSIX here we need this
struct ip_mreq
{
{
int dummy;
};
};
#include <stdio.h>
#include <stdlib.h>

Wyświetl plik

@ -188,6 +188,7 @@
#define PARM_BAT setting2idx_builtin(RIG_PARM_BAT)
#define PARM_KEYLIGHT setting2idx_builtin(RIG_PARM_KEYLIGHT)
#define PARM_BANDSELECT setting2idx_builtin(RIG_PARM_BANDSELECT)
#define PARM_SCREENSAVER setting2idx_builtin(RIG_PARM_SCREENSAVER)
/* Rotator levels */

Wyświetl plik

@ -565,7 +565,7 @@ int rig_sprintf_parm_gran(char *str, int nlen, setting_t parm,
if (RIG_PARM_IS_FLOAT(rig_idx2setting(i)))
{
len += sprintf(str + len,
"%s(%f..%f/%f) ",
"%s(%.g..%.g/%.g) ",
ms,
gran[i].min.f,
gran[i].max.f,