(cherry picked from commit 3211e3aea1)
Hamlib-4.0
Michael Black W9MDB 2020-12-21 23:50:29 -06:00 zatwierdzone przez Nate Bargmann
rodzic 030f0fbe87
commit 3c270f3a29
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F72625E2EDBED598
3 zmienionych plików z 24 dodań i 15 usunięć

Wyświetl plik

@ -1573,18 +1573,18 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
int ack_len = sizeof(ackbuf);
rmode_t icom_mode;
unsigned char dm_sub_cmd =
rig->caps->rig_model == RIG_MODEL_IC7200 ? 0x04 : S_MEM_DATA_MODE;
rig->caps->rig_model == RIG_MODEL_IC7200 ? 0x04 : S_MEM_DATA_MODE;
int filter_byte = rig->caps->rig_model == RIG_MODEL_IC7100
|| rig->caps->rig_model == RIG_MODEL_IC7200
|| rig->caps->rig_model == RIG_MODEL_IC7300
|| rig->caps->rig_model == RIG_MODEL_IC7600
|| rig->caps->rig_model == RIG_MODEL_IC7610
|| rig->caps->rig_model == RIG_MODEL_IC7700
|| rig->caps->rig_model == RIG_MODEL_IC7800
|| rig->caps->rig_model == RIG_MODEL_IC785x
|| rig->caps->rig_model == RIG_MODEL_IC9100
|| rig->caps->rig_model == RIG_MODEL_IC9700
|| rig->caps->rig_model == RIG_MODEL_IC705;
|| rig->caps->rig_model == RIG_MODEL_IC7200
|| rig->caps->rig_model == RIG_MODEL_IC7300
|| rig->caps->rig_model == RIG_MODEL_IC7600
|| rig->caps->rig_model == RIG_MODEL_IC7610
|| rig->caps->rig_model == RIG_MODEL_IC7700
|| rig->caps->rig_model == RIG_MODEL_IC7800
|| rig->caps->rig_model == RIG_MODEL_IC785x
|| rig->caps->rig_model == RIG_MODEL_IC9100
|| rig->caps->rig_model == RIG_MODEL_IC9700
|| rig->caps->rig_model == RIG_MODEL_IC705;
rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__);
@ -1641,6 +1641,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
}
rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom);
if (filter_byte && width_icom != -1) // then we need the width byte too
{
// since width_icom is 0-2 for rigs that need this here we have to make it 1-3

Wyświetl plik

@ -7438,7 +7438,8 @@ int newcat_set_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
{
// some rigs now require the bandwidth be turned "on"
int on = is_ft891;
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SH%c%d%02d;", main_sub_vfo, on, w);
snprintf(priv->cmd_str, sizeof(priv->cmd_str), "SH%c%d%02d;", main_sub_vfo, on,
w);
}
else
{
@ -7627,7 +7628,8 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
char cmd[] = "SH";
char main_sub_vfo = '0';
rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s\n", __func__, rig_strvfo(vfo), rig_strrmode(mode));
rig_debug(RIG_DEBUG_VERBOSE, "%s called, vfo=%s, mode=%s\n", __func__,
rig_strvfo(vfo), rig_strrmode(mode));
if (!newcat_valid_command(rig, cmd))
{
@ -7682,12 +7684,14 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
int on;
// do we need to pay attention to the Main/Sub here?
int n = sscanf(priv->ret_data, "SH%*1d%1d%3d", &on, &w);
if (n != 2)
{
err = -RIG_EPROTO;
}
#if 0 // this may apply to another Yaesu rig
if (n == 2)
{
if (!on) { w = 0; }
@ -7696,6 +7700,7 @@ int newcat_get_rx_bandwidth(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t *width)
{
err = -RIG_EPROTO;
}
#endif
}
else if (strlen(priv->ret_data) == 6)

Wyświetl plik

@ -1941,12 +1941,15 @@ pbwidth_t HAMLIB_API rig_passband_normal(RIG *rig, rmode_t mode)
{
if (rs->filters[i].modes & mode)
{
rig_debug(RIG_DEBUG_VERBOSE, "%s: return filter#%d, width=%d\n", __func__, i, (int)rs->filters[i].width);
rig_debug(RIG_DEBUG_VERBOSE, "%s: return filter#%d, width=%d\n", __func__, i,
(int)rs->filters[i].width);
return rs->filters[i].width;
}
}
rig_debug(RIG_DEBUG_VERBOSE, "%s: filter not found...return RIG_PASSBAND_NORMAL=%d\n", __func__, (int)RIG_PASSBAND_NORMAL);
rig_debug(RIG_DEBUG_VERBOSE,
"%s: filter not found...return RIG_PASSBAND_NORMAL=%d\n", __func__,
(int)RIG_PASSBAND_NORMAL);
return RIG_PASSBAND_NORMAL;
}