kopia lustrzana https://github.com/Hamlib/Hamlib
Add set/get_vfo for ft991 so rigctld can be used wihout --vfo argument
Hopefully fixes rig_vfo_op function too https://github.com/Hamlib/Hamlib/issues/858pull/875/head
rodzic
dbb9f90abf
commit
4e717d2386
|
@ -37,12 +37,15 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "hamlib/rig.h"
|
#include "hamlib/rig.h"
|
||||||
|
#include "misc.h"
|
||||||
#include "newcat.h"
|
#include "newcat.h"
|
||||||
#include "ft991.h"
|
#include "ft991.h"
|
||||||
#include "idx_builtin.h"
|
#include "idx_builtin.h"
|
||||||
|
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
static int ft991_init(RIG *rig);
|
static int ft991_init(RIG *rig);
|
||||||
|
static int ft991_set_vfo(RIG *rig, vfo_t vfo);
|
||||||
|
static int ft991_get_vfo(RIG *rig, vfo_t *vfo);
|
||||||
static int ft991_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
|
static int ft991_get_split_mode(RIG *rig, vfo_t vfo, rmode_t *tx_mode,
|
||||||
pbwidth_t *tx_width);
|
pbwidth_t *tx_width);
|
||||||
static int ft991_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
|
static int ft991_set_split_mode(RIG *rig, vfo_t vfo, rmode_t tx_mode,
|
||||||
|
@ -67,7 +70,7 @@ const struct rig_caps ft991_caps =
|
||||||
RIG_MODEL(RIG_MODEL_FT991),
|
RIG_MODEL(RIG_MODEL_FT991),
|
||||||
.model_name = "FT-991",
|
.model_name = "FT-991",
|
||||||
.mfg_name = "Yaesu",
|
.mfg_name = "Yaesu",
|
||||||
.version = NEWCAT_VER ".6",
|
.version = NEWCAT_VER ".7",
|
||||||
.copyright = "LGPL",
|
.copyright = "LGPL",
|
||||||
.status = RIG_STATUS_STABLE,
|
.status = RIG_STATUS_STABLE,
|
||||||
.rig_type = RIG_TYPE_TRANSCEIVER,
|
.rig_type = RIG_TYPE_TRANSCEIVER,
|
||||||
|
@ -202,6 +205,8 @@ const struct rig_caps ft991_caps =
|
||||||
.get_freq = newcat_get_freq,
|
.get_freq = newcat_get_freq,
|
||||||
.set_mode = newcat_set_mode,
|
.set_mode = newcat_set_mode,
|
||||||
.get_mode = newcat_get_mode,
|
.get_mode = newcat_get_mode,
|
||||||
|
.set_vfo = ft991_set_vfo,
|
||||||
|
.get_vfo = ft991_get_vfo,
|
||||||
.set_ptt = newcat_set_ptt,
|
.set_ptt = newcat_set_ptt,
|
||||||
.get_ptt = newcat_get_ptt,
|
.get_ptt = newcat_get_ptt,
|
||||||
.set_split_vfo = newcat_set_split_vfo,
|
.set_split_vfo = newcat_set_split_vfo,
|
||||||
|
@ -1016,3 +1021,16 @@ static int ft991_get_dcs_sql(RIG *rig, vfo_t vfo, tone_t *code)
|
||||||
|
|
||||||
return RIG_OK;
|
return RIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VFO functions so rigctld can be used without --vfo argument
|
||||||
|
static int ft991_set_vfo(RIG *rig, vfo_t vfo)
|
||||||
|
{
|
||||||
|
rig->state.current_vfo = vfo;
|
||||||
|
RETURNFUNC(RIG_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ft991_get_vfo(RIG *rig, vfo_t *vfo)
|
||||||
|
{
|
||||||
|
*vfo = rig->state.current_vfo;
|
||||||
|
RETURNFUNC(RIG_OK);
|
||||||
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue