Fix Icom rig 0x25 command for set mode with data and no width change

Fix Icom rigs not working with rigtctld and 0x25 command
https://github.com/Hamlib/Hamlib/issues/733
pull/739/head
Mike Black W9MDB 2021-07-03 22:16:33 -05:00
rodzic 716fbb7643
commit dd0187ede6
2 zmienionych plików z 11 dodań i 9 usunięć

Wyświetl plik

@ -1759,20 +1759,17 @@ 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
if (filter_byte) // then we need the filter width byte too
{
// since width_icom is 0-2 for rigs that need this here we have to make it 1-3
datamode[1] = datamode[0] ? width_icom : 0;
if (width_icom == -1) datamode[1] = 1; // default to filter 1
else datamode[1] = width_icom;
retval =
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 2,
ackbuf,
&ack_len);
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 2, ackbuf, &ack_len);
}
else
{
retval =
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf,
&ack_len);
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf, &ack_len);
}
if (retval != RIG_OK)
@ -4815,6 +4812,11 @@ int icom_set_split_freq(RIG *rig, vfo_t vfo, freq_t tx_freq)
cmd = C_SEND_SEL_FREQ;
subcmd = 0x01; // set the unselected vfo
// if we're already on the tx_vfo don't need the "other" vfo
if (rig->state.current_vfo == rig->state.tx_vfo)
{
subcmd = 0x00;
}
retval = icom_transaction(rig, cmd, subcmd, freqbuf, freq_len, ackbuf,
&ack_len);

Wyświetl plik

@ -30,7 +30,7 @@
#include <sys/time.h>
#endif
#define BACKEND_VER "20210614"
#define BACKEND_VER "20210703"
#define ICOM_IS_SECONDARY_VFO(vfo) ((vfo) & (RIG_VFO_B | RIG_VFO_SUB | RIG_VFO_SUB_B | RIG_VFO_MAIN_B))
#define ICOM_GET_VFO_NUMBER(vfo) (ICOM_IS_SECONDARY_VFO(vfo) ? 0x01 : 0x00)