Fix icom filter number for 0x26 command -- filter should not change now at all from what the user sets.

https://github.com/Hamlib/Hamlib/issues/854
pull/875/head
Mike Black W9MDB 2021-11-07 12:39:54 -06:00
rodzic 41ebbb02b5
commit 3b927a81eb
2 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -2027,6 +2027,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
ENTERFUNC; ENTERFUNC;
// if our current mode and width is not changing do nothing // if our current mode and width is not changing do nothing
// this also sets priv->filter to current filter#
retval = rig_get_mode(rig, vfo, &tmode, &twidth); retval = rig_get_mode(rig, vfo, &tmode, &twidth);
if (retval != RIG_OK) if (retval != RIG_OK)
@ -2091,6 +2092,7 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
unsigned char datamode[2]; unsigned char datamode[2];
unsigned char mode_icom; // Not used, we only need the width unsigned char mode_icom; // Not used, we only need the width
signed char width_icom; signed char width_icom;
struct icom_priv_data *priv = rig->state.priv;
TRACE; TRACE;
@ -2101,14 +2103,12 @@ int icom_set_mode_with_data(RIG *rig, vfo_t vfo, rmode_t mode,
case RIG_MODE_PKTFM: case RIG_MODE_PKTFM:
case RIG_MODE_PKTAM: case RIG_MODE_PKTAM:
datamode[0] = 0x01; datamode[0] = 0x01;
datamode[1] = 0x02; // default to filter 2 datamode[1] = priv->filter; // we won't change the current filter
if(width == RIG_PASSBAND_NOCHANGE) datamode[1] = twidth;
break; break;
default: default:
datamode[0] = 0x00; datamode[0] = 0x00;
datamode[1] = 0x02; // default to filter 2 datamode[1] = priv->filter; // we won't change the current filter
if(width == RIG_PASSBAND_NOCHANGE) datamode[1] = twidth;
break; break;
} }

Wyświetl plik

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