pull/425/head
Michael Black W9MDB 2020-10-15 15:44:43 -05:00
rodzic d15c4da091
commit 341828a319
3 zmienionych plików z 134 dodań i 121 usunięć

Wyświetl plik

@ -476,7 +476,8 @@ int ft817_init(RIG *rig)
{
struct ft817_priv_data *priv;
rig_debug(RIG_DEBUG_VERBOSE, "%s: called, version %s\n", __func__, rig->caps->version);
rig_debug(RIG_DEBUG_VERBOSE, "%s: called, version %s\n", __func__,
rig->caps->version);
if ((rig->state.priv = calloc(1, sizeof(struct ft817_priv_data))) == NULL)
{
@ -1457,9 +1458,11 @@ int ft817_set_powerstat(RIG *rig, powerstat_t status)
case RIG_POWER_ON:
// send 5 bytes first, snooze a bit, then PWR_ON
write_block(&rig->state.rigport, (char *) p->pcs[FT817_NATIVE_CAT_PWR_WAKE].nseq, YAESU_CMD_LENGTH);
write_block(&rig->state.rigport,
(char *) p->pcs[FT817_NATIVE_CAT_PWR_WAKE].nseq, YAESU_CMD_LENGTH);
hl_usleep(200 * 1000);
write_block(&rig->state.rigport, (char *) p->pcs[FT817_NATIVE_CAT_PWR_ON].nseq, YAESU_CMD_LENGTH);
write_block(&rig->state.rigport, (char *) p->pcs[FT817_NATIVE_CAT_PWR_ON].nseq,
YAESU_CMD_LENGTH);
return RIG_OK;
case RIG_POWER_STANDBY:

Wyświetl plik

@ -1148,10 +1148,14 @@ int newcat_set_ptt(RIG *rig, vfo_t vfo, ptt_t ptt)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "%s", txoff);
rig_debug(RIG_DEBUG_TRACE, "%s: cmd_str = %s\n", __func__, priv->cmd_str);
err = newcat_set_cmd(rig);
// some rigs like the FT991 need time before doing anything else like set_freq
// We won't mess with CW mode -- no freq change expected hopefully
if (rig->state.current_mode != RIG_MODE_CW)
{
hl_usleep(100 * 1000);
}
break;
default:
@ -3872,6 +3876,7 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR%d%c", status ? 1 : 0,
cat_term);
}
break;
case RIG_FUNC_VOX:
@ -3891,8 +3896,10 @@ int newcat_set_func(RIG *rig, vfo_t vfo, setting_t func, int status)
}
// some rigs use AC02 to actually start tuning
if (status == 1 && (is_ft101 || is_ft5000)) status = 2;
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AC00%d%c", status == 0 ? 0 : status,
if (status == 1 && (is_ft101 || is_ft5000)) { status = 2; }
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "AC00%d%c",
status == 0 ? 0 : status,
cat_term);
break;
@ -4072,6 +4079,7 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
{
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "PR%c", cat_term);
}
break;
case RIG_FUNC_VOX:
@ -4133,11 +4141,13 @@ int newcat_get_func(RIG *rig, vfo_t vfo, setting_t func, int *status)
break;
case RIG_FUNC_COMP:
// 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;
else *status = (retfunc[0] == '0') ? 0 : 1;
if (is_ft101) { *status = (retfunc[1] == '0') ? 0 : 1; }
else { *status = (retfunc[0] == '0') ? 0 : 1; }
break;
case RIG_FUNC_ANF: