Force back to split after set_vfo A if needed\nFixes split getting turned off

pull/39/merge
Michael Black W9MDB 2018-07-06 09:24:26 -05:00 zatwierdzone przez Nate Bargmann
rodzic 993ba79c14
commit 3027ca5f9a
2 zmienionych plików z 14 dodań i 1 usunięć

Wyświetl plik

@ -1156,6 +1156,19 @@ static int flrig_set_vfo(RIG *rig, vfo_t vfo)
rs->tx_vfo = RIG_VFO_B; // always VFOB
read_transaction(rig, xml, sizeof(xml));
/* for some rigs FLRig turns off split when VFOA is selected */
/* so if we are in split and asked for A we have to turn split back on */
if (priv->split && vfo==RIG_VFO_A) {
char xml[MAXXMLLEN];
char value[MAXCMDLEN];
sprintf(value, "<params><param><value><i4>%d</i4></value></param></params>", priv->split);
char *pxml = xml_build("rig.set_split", value, xml, sizeof(xml));
retval = write_transaction(rig, pxml, strlen(pxml));
if (retval < 0) {
return retval;
}
read_transaction(rig, xml, sizeof(xml)); // get response but don't care
}
return RIG_OK;
}

Wyświetl plik

@ -28,7 +28,7 @@
#include <sys/time.h>
#endif
#define BACKEND_VER "1.3"
#define BACKEND_VER "1.4"
#define EOM "\r"
#define TRUE 1