Fix G90 by changing set/get_mode_with_data to set/get_mode and suppress icom_get_dsp_flt

https://github.com/Hamlib/Hamlib/issues/1364
pull/1349/head
Mike Black W9MDB 2023-08-18 08:06:14 -05:00
rodzic 0edd1df223
commit 01730082fb
4 zmienionych plików z 7 dodań i 17 usunięć

Wyświetl plik

@ -1951,7 +1951,6 @@ int filtericom[] = { 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 600, 700,
pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode)
{
int retval, res_len = 0, rfstatus;
unsigned char resbuf[MAXFRAMELEN];
value_t rfwidth;
@ -1984,7 +1983,8 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode)
}
if (RIG_MODEL_X108G == rig->caps->rig_model
|| RIG_MODEL_X5105 == rig->caps->rig_model)
|| RIG_MODEL_X5105 == rig->caps->rig_model
|| RIG_MODEL_G90 == rig->caps->rig_model)
{
priv->no_1a_03_cmd = ENUM_1A_03_NO;
}
@ -2761,12 +2761,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
rig_set_vfo(rig, vfo); // force VFO
}
retval = 0;
// G90 does have dsp_flt command
if (rig->caps->rig_model != RIG_MODEL_G90)
{
retval = icom_get_dsp_flt(rig, *mode);
}
retval = icom_get_dsp_flt(rig, *mode);
*width = retval;
if (retval == 0)
@ -2789,12 +2784,7 @@ int icom_get_mode(RIG *rig, vfo_t vfo, rmode_t *mode, pbwidth_t *width)
// we need to figure out how to read VFOB without swapping VFOs
//HAMLIB_TRACE;
//rig_set_vfo(rig, RIG_VFO_B);
retval = 0;
if (rig->caps->rig_model != RIG_MODEL_G90)
{
retval = icom_get_dsp_flt(rig, *mode);
}
retval = icom_get_dsp_flt(rig, *mode);
*width = retval;
if (*width == 0) { *width = rig->state.cache.widthMainA; } // we'll use VFOA's width

Wyświetl plik

@ -632,8 +632,8 @@ const struct rig_caps g90_caps =
.set_freq = icom_set_freq,
.get_freq = icom_get_freq,
.set_mode = icom_set_mode_with_data,
.get_mode = icom_get_mode_with_data,
.set_mode = icom_set_mode,
.get_mode = icom_get_mode,
.set_vfo = icom_set_vfo,
.set_ant = NULL, /*automatically set by rig depending band */
.get_ant = NULL,

Wyświetl plik

@ -8,7 +8,7 @@ DISTCLEANFILES =
bin_PROGRAMS =
check_PROGRAMS = simelecraft simicgeneric simkenwood simyaesu simic9100 simic9700 simft991 simftdx1200 simftdx3000 simjupiter simpowersdr simid5100 simft736 simftdx5000 simtmd700 simrotorez simspid simft817 simts590 simft847 simic7300 simic7000 simic7100 simic7200 simatd578 simic905 simts450 simic7600 simic7610 simic705 simts950 simts990 simic7851 simftdx101
check_PROGRAMS = simelecraft simicgeneric simkenwood simyaesu simic9100 simic9700 simft991 simftdx1200 simftdx3000 simjupiter simpowersdr simid5100 simft736 simftdx5000 simtmd700 simrotorez simspid simft817 simts590 simft847 simic7300 simic7000 simic7100 simic7200 simatd578 simic905 simts450 simic7600 simic7610 simic705 simts950 simts990 simic7851 simftdx101 simxiegug90
simelecraft_SOURCES = simelecraft.c
simkenwood_SOURCES = simkenwood.c

Plik binarny nie jest wyświetlany.