Fix FTDX101D get COMP function

https://github.com/Hamlib/Hamlib/issues/417
pull/425/head
Michael Black W9MDB 2020-10-15 21:23:12 +01:00
rodzic 8462796b00
commit 2ed842b098
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -74,8 +74,8 @@ int ftdx101d_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
retval = newcat_get_cmd(rig);
if (RIG_OK != retval) { return retval; }
n = sscanf(priv->ret_data, "PR0%d\n", status);
rig_debug(RIG_DEBUG_TRACE, "%s: n=%d, ret_data='%s'\n", __func__, n, priv->ret_data);
if (n == 1) { return RIG_OK; }

Wyświetl plik

@ -4126,6 +4126,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
/* chop term */
priv->ret_data[ret_data_len - 1] = '\0';
rig_debug(RIG_DEBUG_TRACE, "%s: retfunc='%s'\n", __func__, retfunc);
switch (func)
{
case RIG_FUNC_MN:
@ -4136,7 +4137,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
// future Yaesu's may use the new command format
// so we do this check here instead of the back end
// only need to add the "|| is_XXX" here
if (is_ft101) *status = (retfunc[1] == '0') ? 0 : 1;
if (is_ft101) *status = (retfunc[0] == '0') ? 0 : 1;
else *status = (retfunc[0] == '0') ? 0 : 1;
break;