Fix TS890 set_mode

pull/1542/head
Mike Black W9MDB 2024-04-13 06:44:18 -05:00
rodzic bddd7e1a7d
commit 6cfdb9d4ed
2 zmienionych plików z 16 dodań i 5 usunięć

Wyświetl plik

@ -1684,7 +1684,7 @@ int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split,
RETURNFUNC(-RIG_EINVAL); RETURNFUNC(-RIG_EINVAL);
} }
if (RIG_IS_TS990S) if (RIG_IS_TS990S || RIG_IS_TS890S)
{ {
char buf[4]; char buf[4];
@ -2451,13 +2451,19 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
RIG_TARGETABLE_MODE since the toggle is not required for RIG_TARGETABLE_MODE since the toggle is not required for
reading the mode. */ reading the mode. */
vfo_t curr_vfo; vfo_t curr_vfo;
err = kenwood_get_vfo_main_sub(rig, &curr_vfo); if (RIG_IS_TS990S)
err = kenwood_get_vfo_main_sub(rig, &curr_vfo);
else // RIG_IS_TS890
err = kenwood_get_vfo_if(rig, &curr_vfo);
if (err != RIG_OK) { RETURNFUNC2(err); } if (err != RIG_OK) { RETURNFUNC2(err); }
if (vfo != RIG_VFO_CURR && vfo != curr_vfo) if (vfo != RIG_VFO_CURR && vfo != curr_vfo)
{ {
err = kenwood_set_vfo_main_sub(rig, vfo); if (RIG_IS_TS990S)
err = kenwood_set_vfo_main_sub(rig, vfo);
else // RIG_IS_TS890
err = kenwood_set_vfo(rig, curr_vfo);
if (err != RIG_OK) { RETURNFUNC2(err); } if (err != RIG_OK) { RETURNFUNC2(err); }
} }
@ -2467,7 +2473,11 @@ int kenwood_set_mode(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width)
if (err == RIG_OK && vfo != RIG_VFO_CURR && vfo != curr_vfo) if (err == RIG_OK && vfo != RIG_VFO_CURR && vfo != curr_vfo)
{ {
int err2 = kenwood_set_vfo_main_sub(rig, curr_vfo); int err2;
if (RIG_IS_TS990S)
err2 = kenwood_set_vfo_main_sub(rig, curr_vfo);
else // RIG_IS_TS890
err2 = kenwood_set_vfo(rig, curr_vfo);
if (err2 != RIG_OK) { RETURNFUNC2(err2); } if (err2 != RIG_OK) { RETURNFUNC2(err2); }
} }

Wyświetl plik

@ -28,7 +28,7 @@
#include "token.h" #include "token.h"
#include "idx_builtin.h" #include "idx_builtin.h"
#define BACKEND_VER "20240405" #define BACKEND_VER "20240413"
#define EOM_KEN ';' #define EOM_KEN ';'
#define EOM_TH '\r' #define EOM_TH '\r'
@ -211,6 +211,7 @@ int kenwood_set_vfo_main_sub(RIG *rig, vfo_t vfo);
int kenwood_get_vfo_if(RIG *rig, vfo_t *vfo); int kenwood_get_vfo_if(RIG *rig, vfo_t *vfo);
int kenwood_get_vfo_main_sub(RIG *rig, vfo_t *vfo); int kenwood_get_vfo_main_sub(RIG *rig, vfo_t *vfo);
int kenwood_set_split(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo); int kenwood_set_split(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo);
int kenwood_get_vfo_frft(RIG *rig, vfo_t *vfo);
int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo); int kenwood_set_split_vfo(RIG *rig, vfo_t vfo, split_t split, vfo_t txvfo);
int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split, int kenwood_get_split_vfo_if(RIG *rig, vfo_t rxvfo, split_t *split,
vfo_t *txvfo); vfo_t *txvfo);