In newcat.c only execute VS command if available

pull/1022/head
Mike Black W9MDB 2022-04-30 15:33:44 -05:00
rodzic 5cce47e233
commit 157eead021
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -953,8 +953,13 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
// we need to change vfos, BS, and change back
if (newcat_valid_command(rig, "VS"))
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "VS%d;BS%02d%c",
vfo1, newcat_band_index(freq), cat_term);
else
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "BS%02d%c",
newcat_band_index(freq), cat_term);
if (RIG_OK != (err = newcat_set_cmd(rig)))
{
@ -963,6 +968,7 @@ int newcat_set_freq(RIG *rig, vfo_t vfo, freq_t freq)
}
hl_usleep(500 * 1000); // wait for BS to do it's thing and swap back
if (newcat_valid_command(rig, "VS"))
SNPRINTF(priv->cmd_str, sizeof(priv->cmd_str), "VS%d;", vfo2);
}
else