IC705 remove get_powerstat -- doesn't work

Icom do not get width for FM or FMN -- doesn't work
Add tone_enable option to overcome bug in IC-705 where changing freq turns off TONE
pull/1506/head
Mike Black W9MDB 2024-02-01 15:35:19 -06:00
rodzic d9bae6f46f
commit 7310f370c1
3 zmienionych plików z 21 dodań i 4 usunięć

Wyświetl plik

@ -1306,7 +1306,7 @@ struct rig_caps ic705_caps =
RIG_MODEL(RIG_MODEL_IC705), RIG_MODEL(RIG_MODEL_IC705),
.model_name = "IC-705", .model_name = "IC-705",
.mfg_name = "Icom", .mfg_name = "Icom",
.version = BACKEND_VER ".9", .version = BACKEND_VER ".10",
.copyright = "LGPL", .copyright = "LGPL",
.status = RIG_STATUS_STABLE, .status = RIG_STATUS_STABLE,
.rig_type = RIG_TYPE_TRANSCEIVER, .rig_type = RIG_TYPE_TRANSCEIVER,
@ -1562,7 +1562,7 @@ struct rig_caps ic705_caps =
.set_split_vfo = icom_set_split_vfo, .set_split_vfo = icom_set_split_vfo,
.get_split_vfo = icom_get_split_vfo, .get_split_vfo = icom_get_split_vfo,
.set_powerstat = icom_set_powerstat, .set_powerstat = icom_set_powerstat,
.get_powerstat = icom_get_powerstat, // .get_powerstat = icom_get_powerstat, // powerstat is write only
.power2mW = icom_power2mW, .power2mW = icom_power2mW,
.mW2power = icom_mW2power, .mW2power = icom_mW2power,
.send_morse = icom_send_morse, .send_morse = icom_send_morse,

Wyświetl plik

@ -436,6 +436,7 @@ struct icom_addr
#define TOK_CIVADDR TOKEN_BACKEND(1) #define TOK_CIVADDR TOKEN_BACKEND(1)
#define TOK_MODE731 TOKEN_BACKEND(2) #define TOK_MODE731 TOKEN_BACKEND(2)
#define TOK_NOXCHG TOKEN_BACKEND(3) #define TOK_NOXCHG TOKEN_BACKEND(3)
#define TOK_TONE_ENABLE TOKEN_BACKEND(4)
const struct confparams icom_cfg_params[] = const struct confparams icom_cfg_params[] =
{ {
@ -453,6 +454,11 @@ const struct confparams icom_cfg_params[] =
"Don't Use VFO XCHG to set other VFO mode and Frequency", "Don't Use VFO XCHG to set other VFO mode and Frequency",
"0", RIG_CONF_CHECKBUTTON "0", RIG_CONF_CHECKBUTTON
}, },
{
TOK_TONE_ENABLE, "tone_enable", "Turn tone on",
"Overcome a bug in IC-705 to enable tone after frequency change",
"0", RIG_CONF_CHECKBUTTON
},
{RIG_CONF_END, NULL,} {RIG_CONF_END, NULL,}
}; };
@ -1606,6 +1612,11 @@ int icom_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
{ {
RETURNFUNC2(retval); RETURNFUNC2(retval);
} }
if (priv->tone_enable)
{
// IC-705 as of 2024-02-01 turn off TONE on freq change so we turn it back on if enabled
rig_set_func(rig, RIG_VFO_CURR, RIG_FUNC_TONE,1);
}
RETURNFUNC2(RIG_OK); RETURNFUNC2(RIG_OK);
} }
@ -1908,7 +1919,8 @@ pbwidth_t icom_get_dsp_flt(RIG *rig, rmode_t mode)
} }
// TODO: Skip for Xiegu G90 too???? // TODO: Skip for Xiegu G90 too????
if (RIG_MODEL_X108G == rig->caps->rig_model if (mode == RIG_MODE_FM || mode == RIG_MODE_FMN
|| RIG_MODEL_X108G == rig->caps->rig_model
|| RIG_MODEL_X5105 == rig->caps->rig_model) || RIG_MODEL_X5105 == rig->caps->rig_model)
{ {
priv->no_1a_03_cmd = ENUM_1A_03_NO; priv->no_1a_03_cmd = ENUM_1A_03_NO;
@ -4933,6 +4945,10 @@ int icom_set_conf(RIG *rig, hamlib_token_t token, const char *val)
priv->no_xchg = atoi(val) ? 1 : 0; priv->no_xchg = atoi(val) ? 1 : 0;
break; break;
case TOK_TONE_ENABLE:
priv->tone_enable = atoi(val) ? 1 : 0;
break;
default: default:
RETURNFUNC(-RIG_EINVAL); RETURNFUNC(-RIG_EINVAL);
} }

Wyświetl plik

@ -35,7 +35,7 @@
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#define BACKEND_VER "20231209" #define BACKEND_VER "20240201"
#define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31)
#define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51)
@ -292,6 +292,7 @@ struct icom_priv_data
freq_t other_freq_deprecated; /*!< @deprecated Use rig_cache.freqOther - Our other freq depending on which vfo is selected */ freq_t other_freq_deprecated; /*!< @deprecated Use rig_cache.freqOther - Our other freq depending on which vfo is selected */
int vfo_flag; // used to skip vfo check when frequencies are equal int vfo_flag; // used to skip vfo check when frequencies are equal
int dual_watch_main_sub; // 0=main, 1=sub int dual_watch_main_sub; // 0=main, 1=sub
int tone_enable; /*!< Re-enable tone after freq change -- IC-705 bug with gpredict */
}; };
extern const struct ts_sc_list r8500_ts_sc_list[]; extern const struct ts_sc_list r8500_ts_sc_list[];