Fix level_gran on kenwood rigs

https://github.com/Hamlib/Hamlib/issues/1035
pull/1148/head
Mike Black W9MDB 2022-11-13 06:53:55 -06:00
rodzic cc3d912a76
commit 8616be635e
29 zmienionych plików z 114 dodań i 58 usunięć

1
NEWS
Wyświetl plik

@ -17,6 +17,7 @@ Version 4.6
Version 4.5.1
* 2022-XX-XX
* Fix level_gran in all rigs
* Add RIG_FUNC_TUNER to flrig.c
* Fix FT-991 level_gran (needs to be done for lots of rigs)
* Fix man page rigctl to show units for LEVEL items

Wyświetl plik

@ -9,7 +9,7 @@ IC10SRC = ts440.c ts940.c ts711.c ts811.c r5000.c
THSRC = thd7.c thf7.c thg71.c tmd700.c tmv7.c thf6a.c thd72.c tmd710.c thd74.c
KENWOODSRC = kenwood.c kenwood.h th.c th.h ic10.c ic10.h elecraft.c elecraft.h \
transfox.c flex.c flex.h
transfox.c flex.c flex.h level_gran_kenwood.h
noinst_LTLIBRARIES = libhamlib-kenwood.la
libhamlib_kenwood_la_SOURCES = $(TSSRC) $(THSRC) $(IC10SRC) $(KENWOODSRC)

Wyświetl plik

@ -27,6 +27,7 @@
#include <string.h>
#include "token.h"
#include "misc.h"
#include "idx_builtin.h"
#define BACKEND_VER "20221021"

Wyświetl plik

@ -108,11 +108,9 @@ const struct rig_caps thd7a_caps =
.has_set_level = RIG_LEVEL_SET(THD7_LEVEL_ALL),
.has_get_parm = THD7_PARMS,
.has_set_parm = THD7_PARMS, /* FIXME: parms */
.level_gran = {
// cppcheck-suppress *
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_SQL] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_RFPOWER] = { .min = { .i = 3 }, .max = { .i = 0 } },
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,

Wyświetl plik

@ -1650,10 +1650,9 @@ const struct rig_caps thd72a_caps =
.has_set_level = RIG_LEVEL_SET(THD72_LEVEL_ALL),
.has_get_parm = THD72_PARMS,
.has_set_parm = THD72_PARMS, /* FIXME: parms */
.level_gran = {
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_SQL] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_RFPOWER] = { .min = { .i = 2 }, .max = { .i = 0 } },
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood42_ctcss_list,

Wyświetl plik

@ -1676,10 +1676,9 @@ const struct rig_caps thd74_caps =
.has_set_level = RIG_LEVEL_SET(THD74_LEVEL_ALL),
.has_get_parm = THD74_PARMS,
.has_set_parm = THD74_PARMS,
.level_gran = {
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_SQL] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_RFPOWER] = { .min = { .i = 2 }, .max = { .i = 0 } },
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,

Wyświetl plik

@ -143,10 +143,9 @@ const struct rig_caps thf6a_caps =
.has_set_level = RIG_LEVEL_SET(THF6_LEVEL_ALL),
.has_get_parm = THF6_PARMS,
.has_set_parm = THF6_PARMS,
.level_gran = {
// cppcheck-suppress *
[LVL_SQL] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_RFPOWER] = { .min = { .i = 2 }, .max = { .i = 0 } },
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = thf6_ctcss_list,

Wyświetl plik

@ -137,10 +137,9 @@ const struct rig_caps thf7e_caps =
.has_set_level = RIG_LEVEL_SET(THF7_LEVEL_ALL),
.has_get_parm = THF7_PARMS,
.has_set_parm = THF7_PARMS,
.level_gran = {
// cppcheck-suppress *
[LVL_SQL] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_RFPOWER] = { .min = { .i = 2 }, .max = { .i = 0 } },
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = thf7_ctcss_list,

Wyświetl plik

@ -108,11 +108,9 @@ const struct rig_caps thg71_caps =
.has_set_func = THG71_FUNC_ALL,
.has_get_level = THG71_LEVEL_ALL,
.has_set_level = RIG_LEVEL_SET(THG71_LEVEL_ALL),
.level_gran = {
// cppcheck-suppress *
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_SQL] = { .min = { .i = 0 }, .max = { .i = 5 } },
[LVL_RFPOWER] = { .min = { .i = 3 }, .max = { .i = 0 } },
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,

Wyświetl plik

@ -120,12 +120,9 @@ const struct rig_caps tmd700_caps =
.has_set_level = RIG_LEVEL_SET(TMD700_LEVEL_ALL),
.has_get_parm = TMD700_PARMS,
.has_set_parm = TMD700_PARMS, /* FIXME: parms */
.level_gran = {
// cppcheck-suppress *
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 7 } },
[LVL_SQL] = { .min = { .i = 0 }, .max = { .i = 0x1f }, .step = { .f = 1. / 0x1f } },
[LVL_RFPOWER] = { .min = { .i = 2 }, .max = { .i = 0 }, .step = { .f = 1. / 3. } },
[LVL_AF] = { .min = { .i = 0 }, .max = { .i = 0x3f }, .step = { .f = 1. / 0x3f } },
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,

Wyświetl plik

@ -283,7 +283,10 @@ const struct rig_caps tmd710_caps =
.has_set_level = RIG_LEVEL_SET(TMD710_LEVEL_ALL),
.has_get_parm = TMD710_PARMS,
.has_set_parm = TMD710_PARMS,
.level_gran = {},
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood42_ctcss_list,
.dcs_list = common_dcs_list,
@ -438,7 +441,10 @@ const struct rig_caps tmv71_caps =
.has_set_level = RIG_LEVEL_SET(TMD710_LEVEL_ALL),
.has_get_parm = TMD710_PARMS,
.has_set_parm = TMD710_PARMS,
.level_gran = {},
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood42_ctcss_list,
.dcs_list = common_dcs_list,

Wyświetl plik

@ -116,11 +116,9 @@ const struct rig_caps tmv7_caps =
.has_set_func = TMV7_FUNC_ALL,
.has_get_level = TMV7_LEVEL_ALL,
.has_set_level = RIG_LEVEL_SET(TMV7_LEVEL_ALL),
.level_gran = {
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 7 } },
[LVL_SQL] = { .min = { .i = 0 }, .max = { .i = 32 } },
[LVL_AF] = { .min = { .i = 0 }, .max = { .i = 32 } },
[LVL_RFPOWER] = { .min = { .i = 0 }, .max = { .i = 2 } },
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,

Wyświetl plik

@ -93,7 +93,10 @@ const struct rig_caps trc80_caps =
.has_set_level = RIG_LEVEL_SET(TRC80_LEVEL_ALL),
.has_get_parm = TRC80_PARMS,
.has_set_parm = RIG_LEVEL_SET(TRC80_PARMS), /* FIXME: parms */
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.preamp = { RIG_DBLST_END, },
.attenuator = { RIG_DBLST_END, },

Wyświetl plik

@ -151,7 +151,10 @@ const struct rig_caps ts2000_caps =
.has_set_level = RIG_LEVEL_SET(TS2000_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE, /* FIXME: parms */
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.vfo_ops = TS2000_VFO_OP,
.scan_ops = TS2000_SCAN_OP,

Wyświetl plik

@ -149,7 +149,10 @@ const struct rig_caps ts450s_caps =
.has_set_level = RIG_LEVEL_SET(TS450S_LEVEL_ALL),
.has_get_parm = 0,
.has_set_parm = 0,
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.extparms = ts450_ext_parms,
.ctcss_list = NULL, /* hw dip-switch */

Wyświetl plik

@ -43,6 +43,9 @@
#define TS480_LEVEL_ALL (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_AGC|RIG_LEVEL_MICGAIN|RIG_LEVEL_STRENGTH|RIG_LEVEL_KEYSPD|RIG_LEVEL_CWPITCH| \
RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_NR|RIG_LEVEL_PREAMP|RIG_LEVEL_COMP|RIG_LEVEL_ATT|RIG_LEVEL_VOXDELAY|RIG_LEVEL_VOXGAIN|RIG_LEVEL_BKIN_DLYMS| \
RIG_LEVEL_METER|RIG_LEVEL_SWR|RIG_LEVEL_COMP_METER|RIG_LEVEL_ALC|RIG_LEVEL_RFPOWER_METER|RIG_LEVEL_SLOPE_HIGH|RIG_LEVEL_SLOPE_LOW)
#define TS480_LEVEL_SET (RIG_LEVEL_RFPOWER|RIG_LEVEL_AF|RIG_LEVEL_RF|RIG_LEVEL_SQL|RIG_LEVEL_AGC|RIG_LEVEL_MICGAIN|RIG_LEVEL_KEYSPD|RIG_LEVEL_CWPITCH| \
RIG_LEVEL_MONITOR_GAIN|RIG_LEVEL_NB|RIG_LEVEL_NR|RIG_LEVEL_PREAMP|RIG_LEVEL_COMP|RIG_LEVEL_ATT|RIG_LEVEL_VOXDELAY|RIG_LEVEL_VOXGAIN|RIG_LEVEL_BKIN_DLYMS| \
RIG_LEVEL_SLOPE_HIGH|RIG_LEVEL_SLOPE_LOW)
#define TS480_FUNC_ALL (RIG_FUNC_NB|RIG_FUNC_COMP|RIG_FUNC_VOX|RIG_FUNC_NR|RIG_FUNC_NR|RIG_FUNC_BC|RIG_FUNC_BC2|RIG_FUNC_RIT|RIG_FUNC_XIT| \
RIG_FUNC_TUNER|RIG_FUNC_MON|RIG_FUNC_FBKIN|RIG_FUNC_LOCK)
@ -1379,7 +1382,9 @@ const struct rig_caps ts480_caps =
RIG_FLT_END,
},
.vfo_ops = TS480_VFO_OPS,
.level_gran = {
.level_gran =
{
#include "level_gran_kenwood.h"
[LVL_RAWSTR] = { .min = { .i = 0 }, .max = { .i = 255 } },
[LVL_VOXDELAY] = { .min = { .i = 0 }, .max = { .i = 30 }, .step = { .i = 1 } },
[LVL_KEYSPD] = {.min = {.i = 10}, .max = {.i = 60}, .step = {.i = 1}},
@ -1421,7 +1426,7 @@ const struct rig_caps ts480_caps =
.set_ant = kenwood_set_ant,
.get_ant = kenwood_get_ant,
.scan = kenwood_scan, /* not working, invalid arguments using rigctl; kenwood_scan does only support on/off and not tone and CTCSS scan */
.has_set_level = TS480_LEVEL_ALL,
.has_set_level = TS480_LEVEL_SET,
.has_get_level = TS480_LEVEL_ALL,
.set_level = kenwood_ts480_set_level,
.get_level = kenwood_ts480_get_level,

Wyświetl plik

@ -77,7 +77,10 @@ const struct rig_caps ts50s_caps =
.has_set_level = RIG_LEVEL_SET(TS50_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE, /* FIXME: parms */
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = NULL,
.dcs_list = NULL,

Wyświetl plik

@ -927,7 +927,10 @@ const struct rig_caps ts570s_caps =
.has_set_level = RIG_LEVEL_SET(TS570_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE, /* FIXME: parms */
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,
.dcs_list = NULL,
@ -1109,7 +1112,10 @@ const struct rig_caps ts570d_caps =
.has_set_level = RIG_LEVEL_SET(TS570_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE, /* FIXME: parms */
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,
.dcs_list = NULL,

Wyświetl plik

@ -235,6 +235,10 @@ const struct rig_caps ts590_caps =
.has_get_level = TS590_LEVEL_ALL,
.set_level = kenwood_set_level,
.get_level = ts590_get_level,
.level_gran =
{
#include "level_gran_kenwood.h"
},
.has_get_func = TS590_FUNC_ALL,
.has_set_func = TS590_FUNC_ALL,
.set_func = kenwood_set_func,

Wyświetl plik

@ -98,7 +98,10 @@ const struct rig_caps ts690s_caps =
.has_set_level = RIG_LEVEL_SET(TS690_LEVEL_ALL),
.has_get_parm = TS690_PARMS,
.has_set_parm = RIG_LEVEL_SET(TS690_PARMS), /* FIXME: parms */
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.preamp = { RIG_DBLST_END, },
.attenuator = { RIG_DBLST_END, },

Wyświetl plik

@ -124,7 +124,10 @@ const struct rig_caps ts711_caps =
.has_set_level = RIG_LEVEL_SET(TS711_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE,
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.vfo_ops = TS711_VFO_OP,
.scan_ops = TS711_SCAN_OP,

Wyświetl plik

@ -95,7 +95,10 @@ const struct rig_caps ts790_caps =
.has_set_level = RIG_LEVEL_SET(TS790_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE,
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.vfo_ops = TS790_VFO_OP,
.scan_ops = TS790_SCAN_OP,

Wyświetl plik

@ -110,7 +110,10 @@ const struct rig_caps ts811_caps =
.has_set_level = RIG_LEVEL_SET(TS811_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE,
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,
.preamp = { RIG_DBLST_END, },

Wyświetl plik

@ -127,7 +127,10 @@ const struct rig_caps ts850_caps =
.has_set_level = TS850_LEVEL_SET,
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE,
.level_gran = {},
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.extparms = ts850_ext_parms,
.ctcss_list = kenwood38_ctcss_list,

Wyświetl plik

@ -563,7 +563,10 @@ const struct rig_caps ts870s_caps =
.has_set_level = TS870S_LEVEL_SET,
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE, /* FIXME: parms */
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,
.dcs_list = NULL,

Wyświetl plik

@ -382,6 +382,10 @@ const struct rig_caps ts890s_caps =
.has_get_level = TS890_LEVEL_ALL,
.set_level = kenwood_ts890_set_level,
.get_level = kenwood_ts890_get_level,
.level_gran =
{
#include "level_gran_kenwood.h"
},
.has_get_func = TS890_FUNC_ALL,
.has_set_func = TS890_FUNC_ALL,
.set_func = kenwood_set_func,

Wyświetl plik

@ -80,7 +80,10 @@ const struct rig_caps ts930_caps =
.has_set_level = RIG_LEVEL_SET(TS930_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE, /* FIXME: parms */
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.preamp = { RIG_DBLST_END, }, /* FIXME: preamp list */
.attenuator = { 6, 12, 18, RIG_DBLST_END, }, /* TBC */

Wyświetl plik

@ -84,7 +84,10 @@ const struct rig_caps ts950s_caps =
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE,
.level_gran = {},
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,
.dcs_list = NULL,
@ -226,7 +229,10 @@ const struct rig_caps ts950sdx_caps =
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE,
.level_gran = {},
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.ctcss_list = kenwood38_ctcss_list,
.dcs_list = NULL,

Wyświetl plik

@ -146,7 +146,10 @@ const struct rig_caps ts990s_caps =
.has_set_level = RIG_LEVEL_SET(TS2000_LEVEL_ALL),
.has_get_parm = RIG_PARM_NONE,
.has_set_parm = RIG_PARM_NONE, /* FIXME: parms */
.level_gran = {}, /* FIXME: granularity */
.level_gran =
{
#include "level_gran_kenwood.h"
},
.parm_gran = {},
.vfo_ops = TS990S_VFO_OP,
.scan_ops = TS990S_SCAN_OP,