kopia lustrzana https://github.com/Hamlib/Hamlib
astyle icom.c
rodzic
2ff3fa0782
commit
c0743dfe6e
|
@ -1627,25 +1627,26 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
|
|||
break;
|
||||
}
|
||||
|
||||
if (width != RIG_PASSBAND_NOCHANGE) {
|
||||
if (filter_byte) // then we need the width byte too
|
||||
if (width != RIG_PASSBAND_NOCHANGE)
|
||||
{
|
||||
unsigned char mode_icom; // not used as it will map to USB/LSB
|
||||
signed char width_icom;
|
||||
rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom);
|
||||
// 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;
|
||||
retval =
|
||||
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, width_icom == -1 ? 1 : 2,
|
||||
ackbuf,
|
||||
&ack_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
retval =
|
||||
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf,
|
||||
&ack_len);
|
||||
}
|
||||
if (filter_byte) // then we need the width byte too
|
||||
{
|
||||
unsigned char mode_icom; // not used as it will map to USB/LSB
|
||||
signed char width_icom;
|
||||
rig2icom_mode(rig, vfo, mode, width, &mode_icom, &width_icom);
|
||||
// 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;
|
||||
retval =
|
||||
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, width_icom == -1 ? 1 : 2,
|
||||
ackbuf,
|
||||
&ack_len);
|
||||
}
|
||||
else
|
||||
{
|
||||
retval =
|
||||
icom_transaction(rig, C_CTL_MEM, dm_sub_cmd, datamode, 1, ackbuf,
|
||||
&ack_len);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue